Developer menu does not appear
Friends are the cause of the error. The menu I created in the plugin does not appear in the site
HTML:
{$menu}
---------------------
PHP:
public function __construct()
{
parent::__construct();
$language = OW::getLanguage();
$menu = new BASE_CMP_ContentMenu();
if (OW::getUser()->isAuthorized('games-index', 'index')) {
$menuItem = new BASE_MenuItem();
$menuItem->setKey('games-index');
$menuItem->setLabel($language->text('games', 'index_page_heading'));
$menuItem->setUrl(OW::getRouter()->urlForRoute('games.index'));
$menuItem->setIconClass('ow_ic_groups');
$menuItem->setOrder(1);
$menu->addElement($menuItem);
$menuItem = new BASE_MenuItem();
$menuItem->setKey('games-gamesofchance');
$menuItem->setLabel($language->text('games', 'gamesofchance_page_heading'));
$menuItem->setUrl(OW::getRouter()->urlForRoute('games.gamesofchance'));
$menuItem->setIconClass('ow_ic_help');
$menuItem->setOrder(2);
$menu->addElement($menuItem);
}
$this->addComponent('menu', $menu);
$this->menu = $menu;
}
public function index($params)
{
$menu = $this->__construct();
$menu = $this->menu->getElement('games-index');
if ($menu) {
$el->setActive(true);
}
public function gamesofchance($params)
{
$menu = $this->__construct();
$menu = $this->menu->getElement('games-index');
if ($menu) {
$el->setActive(true);
}
}
}