public function EmptyFieldsPluginManager::__construct in Empty fields 8
Constructs a new EmptyFieldsPluginManager.
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/
EmptyFieldsPluginManager.php, line 32
Class
- EmptyFieldsPluginManager
- Provides a plugin manager for empty fields.
Namespace
Drupal\empty_fieldsCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/EmptyFields', $namespaces, $module_handler, EmptyFieldPluginInterface::class, EmptyField::class);
$this
->setCacheBackend($cache_backend, 'empty_fields');
}