$newItem = array(
'name' => Yii::t('app', 'Articles'),
'icon' => 'glyphicon-book',
'active' => 'api_keys',
'route' => Yii::app()->apps->getAppUrl('frontend', 'articles'),
);
$newItem = array(
'name' => Yii::t('app', 'Articles'),
'icon' => 'glyphicon-book',
'active' => 'api_keys',
'route' => 'https://www.google.com/',
);
sorry, and one last question. how do rearrange menu so that new item is always at bottom, below api
public function _addMenuItem(array $items = array())
{
$items[] = array(
'name' => Yii::t('app', 'Google'),
'icon' => 'glyphicon-book',
'active' => '',
'route' => 'https://www.google.com/',
);
return $items;
}
This is because the priority of the extensions. When you add a hook, it's format is like this:now the Pages is at the bottom
Yii::app()->hooks->addFilter('the filter name', 'the callback', 'the priority');