Namespace
Drupal\rules\Core
File
-
src/Core/RulesActionManager.php
View source
<?php
namespace Drupal\rules\Core;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\CategorizingPluginManagerTrait;
use Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator;
use Drupal\rules\Context\AnnotatedClassDiscovery;
use Drupal\rules\Core\Annotation\RulesAction;
class RulesActionManager extends DefaultPluginManager implements RulesActionManagerInterface {
use CategorizingPluginManagerTrait;
use ContextAwarePluginManagerTrait;
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/RulesAction', $namespaces, $module_handler, RulesActionInterface::class, RulesAction::class);
$this->alterInfo('rules_action_info');
$this->setCacheBackend($cache_backend, 'rules_action_info');
}
protected function getDiscovery() {
if (!$this->discovery) {
$discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName);
$this->discovery = new ContainerDerivativeDiscoveryDecorator($discovery);
}
return $this->discovery;
}
}
Classes
| Title |
Deprecated |
Summary |
| RulesActionManager |
|
Provides a RulesAction plugin manager for the Rules actions API. |