You are here

protected function BibciteFormatManager::getDiscovery in Bibliography & Citation 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/BibciteFormatManager.php \Drupal\bibcite\Plugin\BibciteFormatManager::getDiscovery()

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/Plugin/BibciteFormatManager.php, line 36

Class

BibciteFormatManager
Provides the default bibcite_format manager.

Namespace

Drupal\bibcite\Plugin

Code

protected function getDiscovery() {
  if (!isset($this->discovery)) {
    $this->discovery = new YamlDiscovery('bibcite_format', $this->moduleHandler
      ->getModuleDirectories());
    $this->discovery
      ->addTranslatableProperty('label', 'label_context');
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
  }
  return $this->discovery;
}