You are here

public function TestPreQuery::preQuery in Facets 8

Runs before the query is executed.

Uses the queryType and the facetSource implementation to make sure the alteration to the query was added before the query is executed in the backend?

Parameters

\Drupal\facets\FacetInterface $facet: The facet being changed.

Overrides PreQueryProcessorInterface::preQuery

File

tests/facets_custom_widget/src/Plugin/facets/processor/TestPreQuery.php, line 45

Class

TestPreQuery
The URL processor handler triggers the actual url processor.

Namespace

Drupal\facets_custom_widget\Plugin\facets\processor

Code

public function preQuery(FacetInterface $facet) {
  \Drupal::messenger()
    ->addMessage($this
    ->getConfiguration()['test_value']);
}