Skip to content
Extraits de code Groupes Projets
Valider 8e37ebbc rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Remove deprecated MenuTop::addEntry() and MenuTop::removeEntry()

parent bc191c19
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -8,6 +8,7 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API'
* 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.
* The deprecated methods `MenuTop::addEntry()` and `MenuTop::removeEntry()` have been removed. Use `Piwik\Plugin\Menu` instead.
## Piwik 2.11.0
......
......@@ -31,37 +31,6 @@ use Piwik\Piwik;
*/
class MenuTop extends MenuAbstract
{
/**
* Adds a new entry to the TopMenu.
*
* @param string $topMenuName The menu item 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. If `$isHTML` is true, this can be a string with
* HTML that is simply embedded.
* @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 bool $isHTML Whether `$url` is an HTML string or a URL that will be rendered as a link.
* @param bool|string $tooltip Optional tooltip to display.
* @deprecated since version 2.4.0. See {@link Piwik\Plugin\Menu} for new implementation.
*/
public static function addEntry($topMenuName, $url, $displayedForCurrentUser = true, $order = 10, $isHTML = false, $tooltip = false)
{
if ($isHTML) {
MenuTop::getInstance()->addHtml($topMenuName, $url, $displayedForCurrentUser, $order, $tooltip);
} else {
MenuTop::getInstance()->add($topMenuName, null, $url, $displayedForCurrentUser, $order, $tooltip);
}
}
/**
* @deprecated since version 2.4.0. See {@link Piwik\Plugin\Menu} for new implementation.
*/
public static function removeEntry($menuName, $subMenuName = false)
{
MenuTop::getInstance()->remove($menuName, $subMenuName);
}
/**
* Directly adds a menu entry containing html.
*
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter