示例#1
0
 /**
  * Returns a list of available plugin menu instances.
  *
  * @return \Piwik\Plugin\Menu[]
  */
 protected function getAllMenus()
 {
     if (!empty(self::$menus)) {
         return self::$menus;
     }
     self::$menus = PluginManager::getInstance()->findComponents('Menu', 'Piwik\\Plugin\\Menu');
     return self::$menus;
 }
示例#2
0
 /**
  * To use only for tests.
  *
  * @deprecated The whole $menus cache should be replaced by a real transient cache
  */
 public static function clearMenus()
 {
     self::$menus = array();
 }