interface MenuLinkManagerInterface

Defines an interface for managing menu links and storing their definitions.

Menu link managers support both automatic plugin definition discovery and manually maintaining plugin definitions.

MenuLinkManagerInterface::updateDefinition() can be used to update a single menu link's definition and pass this onto the menu storage without requiring a full MenuLinkManagerInterface::rebuild().

Implementations that do not use automatic discovery should call MenuLinkManagerInterface::addDefinition() or MenuLinkManagerInterface::removeDefinition() when they add or remove links, and MenuLinkManagerInterface::updateDefinition() to update links they have already defined.

Hierarchy

File

core/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php, line 23

Namespace

Drupal\Core\Menu

Members

Name Modifiers Type Description
DiscoveryInterface::getDefinition public function Gets a specific plugin definition.
DiscoveryInterface::getDefinitions public function Gets the definition of all plugins for this type.
DiscoveryInterface::hasDefinition public function Indicates if a specific plugin definition exists.
FactoryInterface::createInstance public function Creates a pre-configured instance of a plugin.
MapperInterface::getInstance public function Gets a preconfigured instance of a plugin.
MenuLinkManagerInterface::addDefinition public function Adds a new menu link definition to the menu tree storage.
MenuLinkManagerInterface::countMenuLinks public function Counts the total number of menu links.
MenuLinkManagerInterface::deleteLinksInMenu public function Deletes all links having a certain menu name.
MenuLinkManagerInterface::getChildIds public function Loads all child link IDs of a given menu link, regardless of visibility.
MenuLinkManagerInterface::getParentIds public function Loads all parent link IDs of a given menu link.
MenuLinkManagerInterface::loadLinksByRoute public function Loads multiple plugin instances based on route.
MenuLinkManagerInterface::menuNameInUse public function Determines if any links use a given menu name.
MenuLinkManagerInterface::rebuild public function Triggers discovery, save, and cleanup of discovered links.
MenuLinkManagerInterface::removeDefinition public function Removes a single link definition from the menu tree storage.
MenuLinkManagerInterface::resetDefinitions public function Resets any local definition cache. Used for testing.
MenuLinkManagerInterface::resetLink public function Resets the values for a menu link based on the values found by discovery.
MenuLinkManagerInterface::updateDefinition public function Updates the values for a menu link definition in the menu tree storage.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuLinkManagerInterface.php/interface/MenuLinkManagerInterface/8.1.x