function RulesActionManager::getDiscovery

Overrides DefaultPluginManager::getDiscovery

File

src/Core/RulesActionManager.php, line 47

Class

RulesActionManager
Provides a RulesAction plugin manager for the Rules actions API.

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