You are here

public function FieldValidationRuleManager::__construct in Field Validation 8

Constructs a new FieldValidationRuleManager.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

Overrides DefaultPluginManager::__construct

File

src/FieldValidationRuleManager.php, line 33

Class

FieldValidationRuleManager
Manages FieldValidationRule plugins.

Namespace

Drupal\field_validation

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/FieldValidationRule', $namespaces, $module_handler, 'Drupal\\field_validation\\FieldValidationRuleInterface', 'Drupal\\field_validation\\Annotation\\FieldValidationRule');
  $this
    ->alterInfo('field_validation_rule_info');
  $this
    ->setCacheBackend($cache_backend, 'field_validation_rule_plugins');
}