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
path: root/core/Menu
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-05-28 07:25:04 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-05-28 07:25:04 +0400
commit3dd18db78bcdffc093f180f4854e29456bd1a627 (patch)
tree22bd8079279a3d2e055749be9965b962fa85e070 /core/Menu
parentab31aea98e870f7675227c7c9d87e0b08d825613 (diff)
refs #5192 updated docs
Diffstat (limited to 'core/Menu')
-rw-r--r--core/Menu/MenuAdmin.php12
-rw-r--r--core/Menu/MenuMain.php1
-rw-r--r--core/Menu/MenuReporting.php9
-rw-r--r--core/Menu/MenuTop.php11
-rwxr-xr-xcore/Menu/MenuUser.php13
5 files changed, 21 insertions, 25 deletions
diff --git a/core/Menu/MenuAdmin.php b/core/Menu/MenuAdmin.php
index 2d48cbeeae..792905cf9b 100644
--- a/core/Menu/MenuAdmin.php
+++ b/core/Menu/MenuAdmin.php
@@ -11,15 +11,15 @@ namespace Piwik\Menu;
use Piwik\Piwik;
/**
- * Contains menu entries for the Admin menu. Plugins can subscribe to the
- * {@hook Menu.Admin.addItems} event to add new pages to the admin menu.
+ * Contains menu entries for the Admin menu.
+ * Plugins can implement the `configureAdminMenu()` method of the `Menu` plugin class to add, rename of remove
+ * items. If your plugin does not have a `Menu` class yet you can create one using `./console generate:menu`.
*
* **Example**
- *
- * // add a new page in an observer to Menu.Admin.addItems
- * public function addAdminMenuItem()
+ *
+ * public function configureAdminMenu(MenuAdmin $menu)
* {
- * MenuAdmin::getInstance()->add(
+ * $menu->add(
* 'MyPlugin_MyTranslatedAdminMenuCategory',
* 'MyPlugin_MyTranslatedAdminPageName',
* array('module' => 'MyPlugin', 'action' => 'index'),
diff --git a/core/Menu/MenuMain.php b/core/Menu/MenuMain.php
index 9f422e755c..4738562f58 100644
--- a/core/Menu/MenuMain.php
+++ b/core/Menu/MenuMain.php
@@ -13,6 +13,7 @@ namespace Piwik\Menu;
* @deprecated since 2.4.0
* @see MenuReporting
* @method static \Piwik\Menu\MenuMain getInstance()
+ * @ignore
*/
class MenuMain extends MenuReporting
{
diff --git a/core/Menu/MenuReporting.php b/core/Menu/MenuReporting.php
index bc791aa6a8..2c5ae297da 100644
--- a/core/Menu/MenuReporting.php
+++ b/core/Menu/MenuReporting.php
@@ -11,15 +11,14 @@ use Piwik\Piwik;
/**
* Contains menu entries for the Reporting menu (the menu displayed under the Piwik logo).
- * Plugins can subscribe to the {@hook Menu.Reporting.addItems} event to add new pages to
- * the reporting menu.
+ * Plugins can implement the `configureReportingMenu()` method of the `Menu` plugin class to add, rename of remove
+ * items. If your plugin does not have a `Menu` class yet you can create one using `./console generate:menu`.
*
* **Example**
*
- * // add a new page in an observer to Menu.Admin.addItems
- * public function addReportingMenuItem()
+ * public function configureReportingMenu(MenuReporting $menu)
* {
- * MenuReporting::getInstance()->add(
+ * $menu->add(
* 'MyPlugin_MyTranslatedMenuCategory',
* 'MyPlugin_MyTranslatedMenuName',
* array('module' => 'MyPlugin', 'action' => 'index'),
diff --git a/core/Menu/MenuTop.php b/core/Menu/MenuTop.php
index 17cefa2135..7a860ef7d6 100644
--- a/core/Menu/MenuTop.php
+++ b/core/Menu/MenuTop.php
@@ -12,15 +12,14 @@ use Piwik\Piwik;
/**
* Contains menu entries for the Top menu (the menu at the very top of the page).
- * Plugins can subscribe to the {@hook Menu.Top.addItems} event to add new pages to
- * the top menu.
+ * Plugins can implement the `configureTopMenu()` method of the `Menu` plugin class to add, rename of remove
+ * items. If your plugin does not have a `Menu` class yet you can create one using `./console generate:menu`.
*
* **Example**
- *
- * // add a new page in an observer to Menu.Admin.addItems
- * public function addTopMenuItem()
+ *
+ * public function configureTopMenu(MenuTop $menu)
* {
- * MenuTop::getInstance()->add(
+ * $menu->add(
* 'MyPlugin_MyTranslatedMenuCategory',
* 'MyPlugin_MyTranslatedMenuName',
* array('module' => 'MyPlugin', 'action' => 'index'),
diff --git a/core/Menu/MenuUser.php b/core/Menu/MenuUser.php
index f492916794..b3d140e6ae 100755
--- a/core/Menu/MenuUser.php
+++ b/core/Menu/MenuUser.php
@@ -8,19 +8,16 @@
*/
namespace Piwik\Menu;
-use Piwik\Piwik;
-
/**
* Contains menu entries for the User menu (the menu at the very top of the page).
- * Plugins can subscribe to the {@hook Menu.User.addItems} event to add new pages to
- * the user menu.
+ * Plugins can implement the `configureUserMenu()` method of the `Menu` plugin class to add, rename of remove
+ * items. If your plugin does not have a `Menu` class yet you can create one using `./console generate:menu`.
*
* **Example**
- *
- * // add a new page in an observer to Menu.User.addItems
- * public function addUserMenuItem()
+ *
+ * public function configureUserMenu(MenuUser $menu)
* {
- * MenuUser::getInstance()->add(
+ * $menu->add(
* 'MyPlugin_MyTranslatedMenuCategory',
* 'MyPlugin_MyTranslatedMenuName',
* array('module' => 'MyPlugin', 'action' => 'index'),