You are here

public function QueryTypePluginBase::__construct in Facets 8

Constructs a \Drupal\Component\Plugin\PluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Overrides PluginBase::__construct

1 call to QueryTypePluginBase::__construct()
SearchApiDate::__construct in src/Plugin/facets/query_type/SearchApiDate.php
Constructs a \Drupal\Component\Plugin\PluginBase object.
1 method overrides QueryTypePluginBase::__construct()
SearchApiDate::__construct in src/Plugin/facets/query_type/SearchApiDate.php
Constructs a \Drupal\Component\Plugin\PluginBase object.

File

src/QueryType/QueryTypePluginBase.php, line 20

Class

QueryTypePluginBase
A base class for query type plugins that implements most of the boilerplate.

Namespace

Drupal\facets\QueryType

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->query = $this->configuration['query'];
  $this->facet = $this->configuration['facet'];
  $this->results = !empty($this->configuration['results']) ? $this->configuration['results'] : [];
}