You are here

protected function ContextualLinkManager::getDiscovery in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Menu/ContextualLinkManager.php \Drupal\Core\Menu\ContextualLinkManager::getDiscovery()

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

core/lib/Drupal/Core/Menu/ContextualLinkManager.php, line 119
Contains \Drupal\Core\Menu\ContextualLinkManager.

Class

ContextualLinkManager
Defines a contextual link plugin manager to deal with contextual links.

Namespace

Drupal\Core\Menu

Code

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