public function WebformVariantManager::__construct in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformVariantManager.php \Drupal\webform\Plugin\WebformVariantManager::__construct()
Constructs a WebformVariantManager.
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 variant.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration object factory.
Overrides DefaultPluginManager::__construct
File
- src/
Plugin/ WebformVariantManager.php, line 47
Class
- WebformVariantManager
- Manages webform variant plugins.
Namespace
Drupal\webform\PluginCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) {
parent::__construct('Plugin/WebformVariant', $namespaces, $module_handler, 'Drupal\\webform\\Plugin\\WebformVariantInterface', 'Drupal\\webform\\Annotation\\WebformVariant');
$this->configFactory = $config_factory;
$this
->alterInfo('webform_variant_info');
$this
->setCacheBackend($cache_backend, 'webform_variant_plugins');
}