/** * Returns the global JToolBar object, only creating it if it * doesn't already exist. * * @param string $name The name of the toolbar. * * @return JToolBar The JToolBar object. * * @since 11.1 */ public static function getInstance($name = 'toolbar') { if ($name == 'toolbar' && class_exists('\\Toolbar')) { return \Toolbar::getRoot(); } if ($name == 'submenu' && class_exists('\\Submenu')) { return \Submenu::getRoot(); } if (empty(self::$instances[$name])) { self::$instances[$name] = new JToolBar($name); } return self::$instances[$name]; }
*/ // No direct access defined('_HZEXEC_') or die; Document::addStyleDeclaration(' .toolbar-box .icon-32-buildprofile:before { content: "\\f007"; } .toolbar-box .icon-32-buildprofile:after { content: "\\f0ad"; right: 0px; bottom: -2px; } .authenticator, .authenticator-status { display: inline-block; text-transform: uppercase; font-size: 0.85em; color: #777; border-radius: 0.25em; padding: 0.2em 0.4em; line-height: 1; border: 1px solid #777; margin: 0 0.5em; } .authenticator-status { display: inline-block; color: red; border-color: red; } '); $canDo = Components\Members\Helpers\Admin::getActions('component'); Toolbar::title(Lang::txt('COM_MEMBERS')); if ($canDo->get('core.admin')) { Toolbar::preferences($this->option); Toolbar::spacer(); //Toolbar::custom('profile', 'buildprofile', '', 'COM_MEMBERS_PROFILE', false); Toolbar::getRoot()->appendButton('Link', 'buildprofile', 'COM_MEMBERS_PROFILE', Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller . '&task=profile')); Toolbar::spacer(); } if ($canDo->get('core.edit.state')) { Toolbar::custom('clearTerms', 'remove', '', 'COM_MEMBERS_CLEAR_TERMS', false); Toolbar::publishList('confirm', 'COM_MEMBERS_CONFIRM'); Toolbar::unpublishList('unconfirm', 'COM_MEMBERS_UNCONFIRM'); Toolbar::spacer(); } if ($canDo->get('core.create')) { Toolbar::addNew(); } if ($canDo->get('core.edit')) { Toolbar::editList(); } if ($canDo->get('core.delete')) {