BetterExposedFiltersWidgetManager.php in Better Exposed Filters 8.5
File
src/Plugin/BetterExposedFiltersWidgetManager.php
View source
<?php
namespace Drupal\better_exposed_filters\Plugin;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Symfony\Component\DependencyInjection\Container;
class BetterExposedFiltersWidgetManager extends DefaultPluginManager {
protected $type;
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');
}
}