Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MenuLinkManager.php

function MenuLinkManager::getDiscovery

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

File

core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 98

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
            ->getModuleDirectories());
        $yaml_discovery->addTranslatableProperty('title', 'title_context');
        $yaml_discovery->addTranslatableProperty('description', 'description_context');
        $this->discovery = new ContainerDerivativeDiscoveryDecorator($yaml_discovery);
    }
    return $this->discovery;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal