You are here

protected function LocalActionManager::getDiscovery in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Menu/LocalActionManager.php \Drupal\Core\Menu\LocalActionManager::getDiscovery()
  2. 10 core/lib/Drupal/Core/Menu/LocalActionManager.php \Drupal\Core\Menu\LocalActionManager::getDiscovery()

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

core/lib/Drupal/Core/Menu/LocalActionManager.php, line 159

Class

LocalActionManager
Provides the default local action manager using YML as primary definition.

Namespace

Drupal\Core\Menu

Code

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