You are here

public function CoreViewsExposedFilterDeriver::__construct in Core Views Facets 8

Constructs a FacetSource object.

Parameters

string $base_plugin_id: The base plugin ID.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Plugin/facets/facet_source/CoreViewsExposedFilterDeriver.php, line 43

Class

CoreViewsExposedFilterDeriver
Derives a facet source plugin definition for views with exposed filters.

Namespace

Drupal\core_views_facets\Plugin\facets\facet_source

Code

public function __construct($base_plugin_id, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation) {
  $this->basePluginId = $base_plugin_id;
  $this
    ->setEntityTypeManager($entity_type_manager);
  $this->viewStorage = $this->entityTypeManager
    ->getStorage('view');
  $this
    ->setStringTranslation($string_translation);
}