public function BetterExposedFiltersWidgetManager::__construct in Better Exposed Filters 8.5
Same name and namespace in other branches
- 8.4 src/Plugin/BetterExposedFiltersWidgetManager.php \Drupal\better_exposed_filters\Plugin\BetterExposedFiltersWidgetManager::__construct()
Constructs a new BetterExposedFiltersFilterWidgetManager object.
Parameters
string $type: The plugin type, for example filter, pager or sort.
\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/
Plugin/ BetterExposedFiltersWidgetManager.php, line 35
Class
- BetterExposedFiltersWidgetManager
- Provides the Better exposed filters widget plugin manager.
Namespace
Drupal\better_exposed_filters\PluginCode
public function __construct($type, \Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
$plugin_interface = 'Drupal\\better_exposed_filters\\Plugin\\BetterExposedFiltersWidgetInterface';
$plugin_definition_annotation_name = 'Drupal\\better_exposed_filters\\Annotation\\BetterExposedFilters' . Container::camelize($type) . 'Widget';
parent::__construct("Plugin/better_exposed_filters/{$type}", $namespaces, $module_handler, $plugin_interface, $plugin_definition_annotation_name);
$this->type = $type;
$this
->alterInfo('better_exposed_filters_better_exposed_filters_' . $type . '_widget_info');
$this
->setCacheBackend($cache_backend, 'better_exposed_filters:' . $type . '_widget');
}