MenuTreeParameters

Provides a value object to model menu tree parameters. Menu tree parameters are used to determine the set of definitions to be loaded from \Drupal\Core\Menu\MenuTreeStorageInterface. Hence they determine the shape and content of the tree: Which parent IDs should be used to restrict the tree. Only links with a parent in the list will be included. Which menu links are omitted, depending on the minimum and maximum depth. Hierarchy class \Drupal\Core\Menu\MenuTreeParameters File core/lib/Drupa

MenuRouterRebuildSubscriber::__construct

public MenuRouterRebuildSubscriber::__construct(LockBackendInterface $lock, MenuLinkManagerInterface $menu_link_manager) Constructs the MenuRouterRebuildSubscriber object. Parameters \Drupal\Core\Lock\LockBackendInterface $lock: The lock backend. \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The menu link plugin manager. File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 37 Class MenuRouterRebuildSubscriber Rebuilds the default menu links and

MenuRouterRebuildSubscriber::onRouterRebuild

public MenuRouterRebuildSubscriber::onRouterRebuild(Event $event) Rebuilds the menu links and deletes the local_task cache tag. Parameters \Symfony\Component\EventDispatcher\Event $event: The event object. File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 48 Class MenuRouterRebuildSubscriber Rebuilds the default menu links and runs menu-specific code if necessary. Namespace Drupal\Core\EventSubscriber Code public function onRouterRebuild(Event $event) {

MenuRouterRebuildSubscriber::menuLinksRebuild

protected MenuRouterRebuildSubscriber::menuLinksRebuild() Perform menu-specific rebuilding. File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 56 Class MenuRouterRebuildSubscriber Rebuilds the default menu links and runs menu-specific code if necessary. Namespace Drupal\Core\EventSubscriber Code protected function menuLinksRebuild() { if ($this->lock->acquire(__FUNCTION__)) { $transaction = db_transaction(); try { // Ensure the menu li

MenuRouterRebuildSubscriber::getSubscribedEvents

static MenuRouterRebuildSubscriber::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority))

MenuRouterRebuildSubscriber::$menuLinkManager

The menu link plugin manager. Type: \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 27 Class MenuRouterRebuildSubscriber Rebuilds the default menu links and runs menu-specific code if necessary. Namespace Drupal\Core\EventSubscriber Code protected $menuLinkManager;

MenuRouterRebuildSubscriber::$lock

Type: \Drupal\Core\Lock\LockBackendInterface File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 20 Class MenuRouterRebuildSubscriber Rebuilds the default menu links and runs menu-specific code if necessary. Namespace Drupal\Core\EventSubscriber Code protected $lock;

MenuRouterRebuildSubscriber

Rebuilds the default menu links and runs menu-specific code if necessary. Hierarchy class \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber implements EventSubscriberInterface File core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 15 Namespace Drupal\Core\EventSubscriber Members Name Modifiers Type Description MenuRouterRebuildSubscriber::$lock protected property MenuRouterRebuildSubscriber::$menuLinkManager protected property The

MenuParentFormSelectorInterface::parentSelectElement

public MenuParentFormSelectorInterface::parentSelectElement($menu_parent, $id = '', array $menus = NULL) Gets a form element to choose a menu and parent. The specific type of form element will vary depending on the implementation, but callers will normally need to set the #title for the element. Parameters string $menu_parent: A menu name and parent ID concatenated with a ':' character to use as the default value. string $id: (optional) ID of a link plugin. This will exclude the link and its c

MenuParentFormSelectorInterface::getParentSelectOptions

public MenuParentFormSelectorInterface::getParentSelectOptions($id = '', array $menus = NULL, CacheableMetadata &$cacheability = NULL) Gets the options for a select element to choose a menu and parent. Parameters string $id: Optional ID of a link plugin. This will exclude the link and its children from the select options. array $menus: Optional array of menu names as keys and titles as values to limit the select options. If NULL, all menus will be included. \Drupal\Core\Cache\CacheableMeta