You are here

protected function ProdCheckCategoryPluginManager::getDiscovery in Production check & Production monitor 8

Gets the plugin discovery.

Return value

\Drupal\Component\Plugin\Discovery\DiscoveryInterface

Overrides DefaultPluginManager::getDiscovery

File

src/Plugin/ProdCheckCategoryPluginManager.php, line 35

Class

ProdCheckCategoryPluginManager
Defines a prod check categories plugin manager to deal with categories.

Namespace

Drupal\prod_check\Plugin

Code

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