You are here

protected function DefaultPluginManager::getDiscovery in Plug 7

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides PluginManagerBase::getDiscovery

File

lib/Drupal/Core/Plugin/DefaultPluginManager.php, line 258
Contains \Drupal\Core\Plugin\DefaultPluginManager.

Class

DefaultPluginManager
Base class for plugin managers.

Namespace

Drupal\Core\Plugin

Code

protected function getDiscovery() {
  if (!$this->discovery) {
    $discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName);
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($discovery);
  }
  return $this->discovery;
}