public function ValidatorManager::__construct in Clientside Validation 3.0.x
Same name and namespace in other branches
- 8.2 src/ValidatorManager.php \Drupal\clientside_validation\ValidatorManager::__construct()
- 8 src/ValidatorManager.php \Drupal\clientside_validation\ValidatorManager::__construct()
- 2.0.x src/ValidatorManager.php \Drupal\clientside_validation\ValidatorManager::__construct()
Constructs an ValidatorManager object.
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 to invoke the alter hook with.
Overrides DefaultPluginManager::__construct
File
- src/
ValidatorManager.php, line 26
Class
- ValidatorManager
- Validator plugin manager.
Namespace
Drupal\clientside_validationCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/CvValidator', $namespaces, $module_handler, 'Drupal\\clientside_validation\\CvValidatorInterface', 'Drupal\\clientside_validation\\Annotation\\CvValidator');
$this
->alterInfo('clientside_validation_validator_info');
$this
->setCacheBackend($cache_backend, 'clientside_validation_validators');
}