public addTab ( string $title, Horde_Url $link, mixed $params = [] ) | ||
$title | string | The text which appears on the tab. |
$link | Horde_Url | The target page. |
$params | mixed | Either a string value to set the tab variable to, or a hash of parameters. If an array, the tab variable can be set by the 'tabname' key. |
public function addTab($title, $link, $params = array())
{
if (!is_array($params)) {
$params = array('tabname' => $params);
}
$this->_tabs[] = array_merge(array('title' => $title, 'link' => $link->copy(), 'tabname' => null, 'img' => null, 'class' => null), $params);
}
/** * Creates tabs to navigate the user manager area. * * @return Horde_Core_Ui_Tabs */ public static function getUserMgrTabs(Variables $vars) { $url = Horde::url('users/index.php'); $tabs = new Horde_Core_Ui_Tabs('section', $vars); foreach (Vilma::getUserMgrTypes() as $section => $desc) { $tabs->addTab($desc['plural'], $url, $section); } return $tabs; }