/**
* Triggers the Menu.MenuAdmin.addItems hook and returns the admin menu.
*
* @return Array
*/
public function getMenu()
{
if (!$this->menu) {
/**
* Triggered when collecting all available admin menu items. Subscribe to this event if you want
* to add one or more items to the Piwik admin menu.
*
* Menu items should be added via the {@link add()} method.
*
* **Example**
*
* use Piwik\Menu\MenuAdmin;
*
* public function addMenuItems()
* {
* MenuAdmin::getInstance()->add(
* 'MenuName',
* 'SubmenuName',
* array('module' => 'MyPlugin', 'action' => 'index'),
* $showOnlyIf = Piwik::isUserIsSuperUser(),
* $order = 6
* );
* }
*/
Piwik::postEvent('Menu.Admin.addItems');
}
return parent::getMenu();
}