public function YamlFormElementManager::__construct in YAML Form 8
Constructs a new YamlFormElementManager.
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/
YamlFormElementManager.php, line 42
Class
- YamlFormElementManager
- Provides a plugin manager for form element plugins.
Namespace
Drupal\yamlformCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/YamlFormElement', $namespaces, $module_handler, 'Drupal\\yamlform\\YamlFormElementInterface', 'Drupal\\yamlform\\Annotation\\YamlFormElement');
$this
->alterInfo('yamlform_element_info');
$this
->setCacheBackend($cache_backend, 'yamlform_element_plugins');
}