You are here

public function TestPreQuery::supportsFacet in Facets 8

Checks if the facet is supported by this widget.

Reasons why this would be unsupported can be chosen by the widget.

Parameters

\Drupal\facets\FacetInterface $facet: The facet to check for.

Return value

bool Returns true when allowed, false otherwise.

Overrides ProcessorPluginBase::supportsFacet

See also

\Drupal\facets\Widget\WidgetPluginInterface::supportsFacet

File

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

Class

TestPreQuery
The URL processor handler triggers the actual url processor.

Namespace

Drupal\facets_custom_widget\Plugin\facets\processor

Code

public function supportsFacet(FacetInterface $facet) {
  return \Drupal::state()
    ->get('facets_test_supports_facet', TRUE);
}