function MenuLinkManager::getDefinition
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::getDefinition()
- 10 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::getDefinition()
- 11.x core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::getDefinition()
3 calls to MenuLinkManager::getDefinition()
- MenuLinkManager::getChildIds in core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php - Loads all child link IDs of a given menu link, regardless of visibility.
- MenuLinkManager::getParentIds in core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php - Loads all parent link IDs of a given menu link.
- MenuLinkManager::hasDefinition in core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php, line 203
Class
- MenuLinkManager
- Manages discovery, instantiation, and tree building of menu link plugins.
Namespace
Drupal\Core\MenuCode
public function getDefinition($plugin_id, $exception_on_invalid = TRUE) {
$definition = $this->treeStorage
->load($plugin_id);
if (empty($definition) && $exception_on_invalid) {
throw new PluginNotFoundException($plugin_id);
}
return $definition;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.