Piwik\Menu\MenuAbstract::getMenu PHP Метод

getMenu() публичный Метод

Builds the menu, applies edits, renames and orders the entries.
public getMenu ( ) : Array
Результат Array
    public function getMenu()
    {
        $this->buildMenu();
        $this->applyEdits();
        $this->applyRemoves();
        $this->applyRenames();
        $this->applyOrdering();
        return $this->menu;
    }

Usage Example

Пример #1
0
 /**
  * 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();
 }
All Usage Examples Of Piwik\Menu\MenuAbstract::getMenu