public function WebformElementManager::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementManager.php \Drupal\webform\Plugin\WebformElementManager::__construct()
Constructs a WebformElementManager.
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.
\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration object factory.
\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager.
Overrides DefaultPluginManager::__construct
File
- src/
Plugin/ WebformElementManager.php, line 76
Class
- WebformElementManager
- Provides a plugin manager for webform element plugins.
Namespace
Drupal\webform\PluginCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, ConfigFactoryInterface $config_factory, ElementInfoManagerInterface $element_info) {
parent::__construct('Plugin/WebformElement', $namespaces, $module_handler, 'Drupal\\webform\\Plugin\\WebformElementInterface', 'Drupal\\webform\\Annotation\\WebformElement');
$this->configFactory = $config_factory;
$this->elementInfo = $element_info;
$this->themeHandler = $theme_handler;
$this
->alterInfo('webform_element_info');
$this
->setCacheBackend($cache_backend, 'webform_element_plugins');
}