getHtmlTabs() public static method

returns html-code for a tab navigation
public static getHtmlTabs ( array $tabs, array $url_params, string $menu_id, boolean $resizable = false ) : string
$tabs array one element per tab
$url_params array additional URL parameters
$menu_id string HTML id attribute for the menu container
$resizable boolean whether to add a "resizable" class
return string html-code for tab-navigation
示例#1
0
 /**
  * Returns the menu as HTML
  *
  * @return string HTML formatted menubar
  */
 private function _getMenu()
 {
     $url_params = array('db' => $this->_db);
     if (strlen($this->_table) > 0) {
         $tabs = $this->_getTableTabs();
         $url_params['table'] = $this->_table;
         $level = 'table';
     } else {
         if (strlen($this->_db) > 0) {
             $tabs = $this->_getDbTabs();
             $level = 'db';
         } else {
             $tabs = $this->_getServerTabs();
             $level = 'server';
         }
     }
     $allowedTabs = $this->_getAllowedTabs($level);
     foreach ($tabs as $key => $value) {
         if (!array_key_exists($key, $allowedTabs)) {
             unset($tabs[$key]);
         }
     }
     return Util::getHtmlTabs($tabs, $url_params, 'topmenu', true);
 }