MenuLinkManager::rebuild

public MenuLinkManager::rebuild() Triggers discovery, save, and cleanup of discovered links. Overrides MenuLinkManagerInterface::rebuild File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 190 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code public function rebuild() { $definitions = $this->getDefinitions(); // Apply overrides from config. $overrides = $this->overrides->loadMultipleOverri

MenuLinkManager::processDefinition

protected MenuLinkManager::processDefinition(array &$definition, $plugin_id) Performs extra processing on plugin definitions. By default we add defaults for the type to the definition. If a type has additional processing logic, the logic can be added by replacing or extending this method. Parameters array $definition: The definition to be processed and modified by reference. $plugin_id: The ID of the plugin this definition is being used for. File core/lib/Drupal/Core/Menu/MenuLinkManager.p

MenuLinkManager::menuNameInUse

public MenuLinkManager::menuNameInUse($menu_name) Determines if any links use a given menu name. Parameters string $menu_name: The menu name. Return value bool TRUE if any links are present in the named menu, FALSE otherwise. Overrides MenuLinkManagerInterface::menuNameInUse File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 302 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code public function menuNam

MenuLinkManager::loadLinksByRoute

public MenuLinkManager::loadLinksByRoute($route_name, array $route_parameters = array(), $menu_name = NULL) Loads multiple plugin instances based on route. Parameters string $route_name: The route name. array $route_parameters: (optional) The route parameters. Defaults to an empty array. string $menu_name: (optional) Restricts the found links to just those in the named menu. Return value \Drupal\Core\Menu\MenuLinkInterface[] An array of instances keyed by plugin ID. Overrides MenuLinkManagerI

MenuLinkManager::hasDefinition

public MenuLinkManager::hasDefinition($plugin_id) Indicates if a specific plugin definition exists. Parameters string $plugin_id: A plugin ID. Return value bool TRUE if the definition exists, FALSE otherwise. Overrides DiscoveryInterface::hasDefinition File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 216 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code public function hasDefinition($plugin_id) {

MenuLinkManager::getParentIds

public MenuLinkManager::getParentIds($id) Loads all parent link IDs of a given menu link. This method is very similar to getActiveTrailIds() but allows the link to be specified rather than being discovered based on the menu name and request. This method is mostly useful for testing. Parameters string $id: The menu link plugin ID. Return value array An ordered array of IDs representing the path to the root of the tree. The first element of the array will be equal to $id, unless $id is not vali

MenuLinkManager::getInstance

public MenuLinkManager::getInstance(array $options) Gets a preconfigured instance of a plugin. Parameters array $options: An array of options that can be used to determine a suitable plugin to instantiate and how to configure it. Return value object|false A fully configured plugin instance. The interface of the plugin instance will depends on the plugin type. If no instance can be retrieved, FALSE will be returned. Overrides MapperInterface::getInstance File core/lib/Drupal/Core/Menu/MenuLink

MenuLinkManager::getFactory

protected MenuLinkManager::getFactory() Gets the plugin factory. Return value \Drupal\Component\Plugin\Factory\FactoryInterface File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 154 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code protected function getFactory() { if (!isset($this->factory)) { $this->factory = new ContainerFactory($this); } return $this->factory; }

MenuLinkManager::getDiscovery

protected MenuLinkManager::getDiscovery() Gets the plugin discovery. Return value \Drupal\Component\Plugin\Discovery\DiscoveryInterface File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 139 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code protected function getDiscovery() { if (!isset($this->discovery)) { $yaml_discovery = new YamlDiscovery('links.menu', $this->moduleHandler->getModule

MenuLinkManager::getDefinitions

public MenuLinkManager::getDefinitions() Gets the definition of all plugins for this type. Return value mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs. Overrides DiscoveryInterface::getDefinitions File core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 164 Class MenuLinkManager Manages discovery, instantiation, and tree building of menu link plugins. Namespace Drupal\Core\Menu Code public function getDefinitions() { // Since t