W3cubDocs

/Drupal 8

protected function LocalActionManager::getDiscovery

protected 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 139

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;
}

© 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!LocalActionManager.php/function/LocalActionManager::getDiscovery/8.1.x