Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2013-10-25 18:49:33 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-10-25 18:49:42 +0400
commit145fcb57614297bc9be5cbb9597c0820416640be (patch)
tree616e20edb4eb8665f67444c739347930789dbaf1 /core/Menu/MenuAdmin.php
parent6d4d87e81984e68a7f792ea964e9464a9d984231 (diff)
Refs #4200 revised event docs for core/* files.
Diffstat (limited to 'core/Menu/MenuAdmin.php')
-rw-r--r--core/Menu/MenuAdmin.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/core/Menu/MenuAdmin.php b/core/Menu/MenuAdmin.php
index eedd155b11..e58e964b1f 100644
--- a/core/Menu/MenuAdmin.php
+++ b/core/Menu/MenuAdmin.php
@@ -60,24 +60,25 @@ class MenuAdmin extends MenuAbstract
if (!$this->menu) {
/**
- * This event is triggered to collect all available admin menu items. Subscribe to this event if you want
- * to add one or more items to the Piwik admin menu. Just define the name of your menu item as well as a
- * controller and an action that should be executed once a user selects your menu item. It is also possible
- * to display the item only for users having a specific role.
+ * 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.
*
- * Example:
- * ```
- * public function addMenuItems()
- * {
- * MenuAdmin::getInstance()->add(
- * 'MenuName',
- * 'SubmenuName',
- * array('module' => 'MyPlugin', 'action' => 'index'),
- * Piwik::isUserIsSuperUser(),
- * $order = 6
- * );
- * }
- * ```
+ * Menu items should be added via the [Menu::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');
}