MenuLinkManager::getDiscovery
protected function 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\MenuCode
protected function getDiscovery() { if (!isset($this->discovery)) { $yaml_discovery = new YamlDiscovery('links.menu', $this->moduleHandler->getModuleDirectories()); $yaml_discovery->addTranslatableProperty('title', 'title_context'); $yaml_discovery->addTranslatableProperty('description', 'description_context'); $this->discovery = new ContainerDerivativeDiscoveryDecorator($yaml_discovery); } return $this->discovery; }
© 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!MenuLinkManager.php/function/MenuLinkManager::getDiscovery/8.1.x