function ConditionManager::getDiscovery

Overrides DefaultPluginManager::getDiscovery

File

src/Core/ConditionManager.php, line 27

Class

ConditionManager
Extends the core condition manager to add in Rules' context improvements.

Namespace

Drupal\rules\Core

Code

protected function getDiscovery() {
  if (!$this->discovery) {
    // Swap out the annotated class discovery used, so we can control the
    // annotation classes picked.
    $discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName);
    $this->discovery = new ContainerDerivativeDiscoveryDecorator($discovery);
  }
  return $this->discovery;
}