예제 #1
0
 /**
  * Gets the default list of `Portal` tabs.
  *
  * Retrieves all the `portal` modules that have list metadata, thus that can
  * be displayed in Portal `navbar`. This method is only called to initialize
  * the `MySettings_tab` setting. You can override this list by modifying
  * this setting directly.
  *
  * @return array The list of modules that can be tabs in Portal.
  */
 public static function getAllPortalTabs()
 {
     require_once 'modules/ModuleBuilder/Module/SugarPortalBrowser.php';
     $tabs = array('Home');
     $browser = new SugarPortalBrowser();
     $browser->loadModules();
     foreach ($browser->modules as $moduleName => $sugarPortalModule) {
         if (!empty($sugarPortalModule->views['list.php'])) {
             $tabs[] = $moduleName;
         }
     }
     return $tabs;
 }