Gets menu tab for the Debugbar

@return string
176064
public function getTab()
    {
        if (!$this->_profilers) {
            return 'No Profiler';
        }

        foreach ($this->_profilers as $profiler) {
            $queries = 0;
            $time = 0;
            foreach ($profiler as $event) {
                if (in_array($event->getCode(), $this->getQueryEventCodes())) {
                    $time += $event->getElapsedSecs();
                    $queries += 1;
                }
            }
            $profilerInfo[] = $queries . ' in ' . round($time*1000, 2)  . ' ms';
        }
        $html = implode(' / ', $profilerInfo);

        return $html;
    }
83988
public function getTabButton() {
    if (!isset($this->tabButton)) {
      if ($this->context === self::CONTEXT_DELETE) {
        $this->tabButton = new DeleteTabButton($this);
      } else {
        $this->tabButton = new TabButton($this);
      }
    }
    return $this->tabButton;
  }
1280594
def tab_under_menu(self):
        
        if self._menu_pos:
            return self.tabBar().tabAt(self._menu_pos)
        else:
            return self.currentIndex()
1197624
protected function renderMenu()
    {
        $presenter = $this->getPresenter();
        $menu = $presenter->getOpenTagWrapper();

        foreach ($this->getOrderedItems() as $item) {
            if ($item->hidden()) {
                continue;
            }

            if ($item->hasSubMenu()) {
                $menu .= $presenter->getMenuWithDropDownWrapper($item);
            } elseif ($item->isHeader()) {
                $menu .= $presenter->getHeaderWrapper($item);
            } elseif ($item->isDivider()) {
                $menu .= $presenter->getDividerWrapper();
            } else {
                $menu .= $presenter->getMenuWithoutDropdownWrapper($item);
            }
        }

        $menu .= $presenter->getCloseTagWrapper();

        return $menu;
    }
974849
public function getTabLabel() {
    if (isset($this->tabLabel)) {
      return $this->tabLabel;
    } else {
      return $this->entity->getContextLabel(EntityMeta::CONTEXT_TAB);
    }
  }
416840
private int getSelectedTab() {
        String theme = "default";
        List<PageParameters.NamedPair> pairs = getPageParameters().getAllNamed();
        theme = pairs.get(0).getValue();
        if ("grid".equals(theme)) {
            return 1;
        } else if ("skies".equals(theme)) {
            return 2;
        } else if ("gray".equals(theme)) {
            return 3;
        } else if ("darkblue".equals(theme)) {
            return 4;
        } else if ("darkgreen".equals(theme)) {
            return 5;
        } else {
            return 0;
        }
    }
1107057
public function getMenu()
    {
        if (!$this->menu) {

            foreach ($this->getAllMenus() as $menu) {
                $menu->configureTopMenu($this);
            }
        }

        return parent::getMenu();
    }
943392
public function getToolbarHtml()
    {
        $url = Url::toRoute([
            '/' . $this->id . '/default/toolbar',
            'tag' => $this->logTarget->tag,
        ]);
        return '<div id="yii-debug-toolbar" data-url="' . Html::encode($url) . '" style="display:none" class="yii-debug-toolbar-bottom"></div>';
    }
599192
protected function getTabsFileManager()
    {
        $commands = $this->command->getAllowed($this->data_file);

        if (!empty($this->data_selected) && $this->isQuery('selected')) {
            $commands[$this->data_command['command_id']] = $this->data_command;
        }

        $tabs = array();
        foreach ($commands as $command_id => $command) {

            if (!isset($command['tab']) || !$this->access("module_file_manager_$command_id")) {
                continue;
            }

            $tabs[$command['tab']] = array(
                'text' => $this->text($command['tab']),
                'url' => $this->url('', array('path' => $this->data_path, 'cmd' => $command_id)),
            );
        }

        return $tabs;
    }
986513
public function getMenu() { 
        $wt_tree = Globals::getTree();
        $menu = null;
        if(ModuleManager::getInstance()->isOperational($this->getName())) {
            
            $root_url = 'module.php?mod=' . $this->getName() . '&ged=' . $wt_tree->getNameUrl() . '&';
            $sosa_stat_menu = new Menu(I18N::translate('Sosa Statistics'), $root_url . 'mod_action=SosaStats', 'menu-maj-sosa-stats');
            
            $menu = clone $sosa_stat_menu;
            $menu->setClass('menu-maj-sosa');
            
            $submenus = array_filter(array(
                new Menu(I18N::translate('Sosa Ancestors'), $root_url . 'mod_action=SosaList', 'menu-maj-sosa-list', array('rel' => 'nofollow')),
                new Menu(I18N::translate('Missing Ancestors'), $root_url . 'mod_action=SosaList@missing', 'menu-maj-sosa-missing', array('rel' => 'nofollow')),
                $sosa_stat_menu                
            ));
            

            if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_GEODISP_NAME)
                && $ga_list = Module::getModuleByName(Constants::MODULE_MAJ_GEODISP_NAME)->getProvider()->getGeoAnalysisList()
                )
            {
                if(count($ga_list) > 0) {
                    $submenus[] = new Menu(I18N::translate('Geographical Dispersion'), 'module.php?mod=' . Constants::MODULE_MAJ_GEODISP_NAME . '&ged=' . $wt_tree->getNameUrl() . '&mod_action=GeoAnalysis@listAll', 'menu-maj-sosa-geodispersion');
                }
            }
            
            if(Auth::check()) {
                $submenus[] = new Menu(
                    I18N::translate('Sosa Configuration'),
                    $this->getConfigLink(),
                    'menu-maj-sosa-configuration',
                    array('rel' => 'nofollow'));
            }
                        
            //-- recompute Sosa submenu
            $controller = Globals::getController();
            if (!empty($controller) && $controller instanceof IndividualController 
                && Auth::check() && $wt_tree->getUserPreference(Auth::user(), 'MAJ_SOSA_ROOT_ID')
                ) {
                $controller
                    ->addInlineJavascript('
                        function majComputeSosaFromIndi(){
                            if($("#computesosadlg").length == 0) {
                                $("body").append("<div id=\"computesosadlg\" title=\"'. I18N::translate('Sosas computation') .'\"><div id=\"sosaloadingarea\"></div></div>");
                            }
	                        $("#computesosadlg").dialog({
                                modal: true,
                                closeOnEscape: false,
		                        width: 300,
		                        open: function(event, ui) {
			                        $("button.ui-dialog-titlebar-close").hide();
                                    $("#sosaloadingarea").empty().html("<i class=\"icon-loading-small\"></i>");
			                        $("#sosaloadingarea").load("module.php?mod=' . $this->getName() . '&mod_action=SosaConfig@computePartial&ged='. $wt_tree->getNameUrl() .'&userid='.Auth::user()->getUserId().'&pid=' . $controller->getSignificantIndividual()->getXref() . '", 
					                   function(){
						                  $("button.ui-dialog-titlebar-close").show();
                                          setTimeout(function(){
                                            $("#computesosadlg").dialog("close");
                                          }, 2000);
			                            });		
		                          }
	                         });	
                        }');
                	
                $submenus[] = new Menu(
                    I18N::translate('Complete Sosas'), 
                    '#', 
                    'menu-maj-sosa-recompute', 
                    array(
                        'rel' => 'nofollow',
                        'onclick' => 'return majComputeSosaFromIndi();'
                    ));
            }
            
        }
        
        $menu->setSubmenus($submenus);
        
        return $menu;
        
    }
1351438
protected function getTabs()
    {
        $user = $this->loader->getCurrentUser();

        $sql  = "SELECT gr2o_id_organization, gr2o_patient_nr FROM gems__respondent2org WHERE gr2o_id_user = ?";

        $this->defaultTab = $user->getCurrentOrganizationId();
        $this->currentTab = $this->request->getParam(\MUtil_Model::REQUEST_ID2);

        $allowedOrgs  = $user->getRespondentOrganizations();
        $existingOrgs = $this->db->fetchPairs($sql, $this->respondent->getId());
        $tabs         = array();
        
        foreach ($allowedOrgs as $orgId => $name) {
            if (isset($existingOrgs[$orgId])) {
                $tabs[$orgId] = $name;
                $this->hrefs[$orgId] = array(
                    \MUtil_Model::REQUEST_ID1 => $existingOrgs[$orgId],
                    \MUtil_Model::REQUEST_ID2 => $orgId,
                    'RouteReset' => true,
                    );
            }
        }

        return $tabs;
    }
925367
public function sidebarMenuAuto()
    {
        $menu = false;

        if (!$menu || (isset($_GET['menu_cache']) && $_GET['menu_cache'] == 'false')) {
            $menu = new \Municipio\Helper\NavigationTree(array(
                'include_top_level' => !empty(get_field('nav_sub_include_top_level', 'option')) ? get_field('nav_sub_include_top_level', 'option') : false,
                'render' => get_field('nav_sub_render', 'option'),
                'depth' => get_field('nav_sub_depth', 'option') ? get_field('nav_sub_depth', 'option') : -1,
                'start_depth' => get_field('nav_primariy_second_level', 'option') ? 3 : 1,
                'classes' => 'nav-aside hidden-xs hidden-sm',
                'sidebar' => true
            ));
        }

        if ($menu->itemCount === 0) {
            return '';
        }

        return '<nav id="sidebar-menu">
                    ' . $menu->render(false) . '
                </nav>';
    }
606894
public function debugInfo()
    {
        return [
            'exists' => $this->exists(),
            'isFile' => $this->isFile(),
            'isImage' => $this->isImage(),
            'path' => $this->path,
            'lastModified' => $this->lastModified,
            'name' => $this->name,
            'dir' => $this->dir,
            'mimeType' => $this->mimeType,
            'extension' => $this->extension,
            'size' => $this->size,
            'type' => $this->type,
            'getFullName' => $this->getFullName()
        ];
    }
520334
protected function getMenuList()
    {
        if ($this->user->isPasswordResetRequired()) {
            $this->menu->setVisible(false);
            return null;
        }

        return parent::getMenuList();
    }
667241
public function getMenu()
    {
        if ($this->_menu === null) {
            $this->_menu = Yii::$app->get('menu');
        }

        return $this->_menu;
    }
432267
protected function _getUtilityNavigation()
    {
        $action = $this->_action();

        $utilityNavigation = $action->getConfig('scaffold.utility_navigation');
        if ($utilityNavigation === null) {
            $utilityNavigation = [
                new MenuItem('Account', ['controller' => 'Users', 'action' => 'account']),
                new MenuItem('Log Out', ['controller' => 'Users', 'action' => 'logout']),
            ];
        }

        return $utilityNavigation;
    }
999545
public function getToolbar()
    {
        $view = $this->_template->getView();
        $toolbar = $view->getState()->toolbar;
        if (!$toolbar) {
            $controller = $this->getController($view->getName());
            $toolbar = $controller->getIdentifier()->name;
            if ($controller->hasToolbar($toolbar)) {
                $toolbar = $controller->getToolbar($toolbar);
            }
            $controller->toolbar = $toolbar;
        }

        return $view->getState()->toolbar;
    }