function LocalTaskManager::getDiscovery

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::getDiscovery()
  2. 10 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::getDiscovery()
  3. 11.x core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::getDiscovery()

Overrides DefaultPluginManager::getDiscovery

File

core/lib/Drupal/Core/Menu/LocalTaskManager.php, line 147

Class

LocalTaskManager
Provides the default local task manager using YML as primary definition.

Namespace

Drupal\Core\Menu

Code

protected function getDiscovery() {
    if (!isset($this->discovery)) {
        $yaml_discovery = new YamlDiscovery('links.task', $this->moduleHandler
            ->getModuleDirectories());
        $yaml_discovery->addTranslatableProperty('title', 'title_context');
        $this->discovery = new ContainerDerivativeDiscoveryDecorator($yaml_discovery);
    }
    return $this->discovery;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.