From 680721dd29ee874b647b5fb8cd0953b6e3fbeb59 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli <matthieu@mnapoli.fr> Date: Tue, 10 Mar 2015 15:58:18 +1300 Subject: [PATCH] Remove deprecated MenuAdmin::addEntry() and MenuAdmin::removeEntry() --- CHANGELOG.md | 1 + core/Menu/MenuAdmin.php | 26 -------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f7bc8f89..b36f7b5447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' ### Breaking Changes * The deprecated method `Period::factory()` has been removed. Use `Period\Factory` instead. * The deprecated method `Config::getConfigSuperUserForBackwardCompatibility()` has been removed. +* The deprecated methods `MenuAdmin::addEntry()` and `MenuAdmin::removeEntry()` have been removed. Use `Piwik\Plugin\Menu` instead. ## Piwik 2.11.0 diff --git a/core/Menu/MenuAdmin.php b/core/Menu/MenuAdmin.php index 5335091285..9c05734e5f 100644 --- a/core/Menu/MenuAdmin.php +++ b/core/Menu/MenuAdmin.php @@ -32,24 +32,6 @@ use Piwik\Piwik; */ class MenuAdmin extends MenuAbstract { - /** - * Adds a new AdminMenu entry under the 'Settings' category. - * - * @param string $adminMenuName The name of the admin menu entry. 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. - * @deprecated since version 2.4.0. See {@link Piwik\Plugin\Menu} for new implementation. - */ - public static function addEntry($adminMenuName, $url, $displayedForCurrentUser = true, $order = 20) - { - if ($displayedForCurrentUser) { - self::getInstance()->addItem('General_Settings', $adminMenuName, $url, $order); - } - } - /** * See {@link add()}. Adds a new menu item to the development section of the admin menu. * @param string $menuName @@ -142,12 +124,4 @@ class MenuAdmin extends MenuAbstract return parent::getMenu(); } - - /** - * @deprecated since version 2.4.0. See {@link Piwik\Plugin\Menu} for new implementation. - */ - public static function removeEntry($menuName, $subMenuName = false) - { - MenuAdmin::getInstance()->remove($menuName, $subMenuName); - } } -- GitLab