public function FieldStateManager::__construct in Field States UI 8.2
Same name and namespace in other branches
- 8 src/FieldStateManager.php \Drupal\field_states_ui\FieldStateManager::__construct()
Constructs a new FieldStateManager.
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.
\Psr\Log\LoggerInterface $logger: The logger.
Overrides DefaultPluginManager::__construct
File
- src/
FieldStateManager.php, line 48
Class
- FieldStateManager
- Manages field state plugins.
Namespace
Drupal\field_states_uiCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, LoggerInterface $logger) {
parent::__construct('Plugin/FieldState', $namespaces, $module_handler, 'Drupal\\field_states_ui\\FieldStateInterface', 'Drupal\\field_states_ui\\Annotation\\FieldState');
$this
->alterInfo('field_state_info');
$this
->setCacheBackend($cache_backend, 'field_state_plugins');
$this->logger = $logger;
}