diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-23 15:01:41 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-23 15:01:41 +0400 |
commit | c70f21f0877ef1ae1df73637c200682f6b68fbd2 (patch) | |
tree | 95e11c71457f8bca3bd3407a3bccc9a760dbac27 /core/Menu/MenuAbstract.php | |
parent | 475a7cc0677da8c6305b87d51159302934983c6c (diff) |
Refs #4200, document core/Menu/*.php and core/Period/Range.php and remove Range::removePeriod and replace w/ Date::addPeriod.
Diffstat (limited to 'core/Menu/MenuAbstract.php')
-rw-r--r-- | core/Menu/MenuAbstract.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/core/Menu/MenuAbstract.php b/core/Menu/MenuAbstract.php index c141e617bb..e5293d5733 100644 --- a/core/Menu/MenuAbstract.php +++ b/core/Menu/MenuAbstract.php @@ -15,6 +15,12 @@ use Piwik\Plugins\SitesManager\API; use Piwik\Singleton; /** + * Base class for classes that manage one of Piwik's menus. + * + * There are three menus in Piwik, the main menu, the top menu and the admin menu. + * Each menu has a class that manages the rendering of it. Each class invokes + * a different event to allow plugins to add new menu items. + * * @package Piwik_Menu * @static \Piwik\Menu\MenuAbstract getInstance() */ @@ -45,12 +51,15 @@ abstract class MenuAbstract extends Singleton /** * Adds a new entry to the menu. * - * @param string $menuName - * @param string $subMenuName - * @param string $url - * @param bool $displayedForCurrentUser - * @param int $order - * @param bool|string $tooltip Tooltip to display. + * @param string $menuName The menu's category name. Can be a translation token. + * @param string $subMenuName The menu item's name. Can be a translation token. + * @param string|array $url The URL the admin menu entry should link to, or an array of query parameters + * that can be used to build the URL. + * @param boolean $displayedForCurrentUser Whether this menu entry should be displayed for the + * current user. If false, the entry will not be added. + * @param int $order The order hint. + * @param false|string $tooltip An optional tooltip to display. + * @api */ public function add($menuName, $subMenuName, $url, $displayedForCurrentUser = true, $order = 50, $tooltip = false) { @@ -224,4 +233,4 @@ abstract class MenuAbstract extends Singleton } return ($itemOne['_order'] < $itemTwo['_order']) ? -1 : 1; } -} +}
\ No newline at end of file |