You are here

public function CoreViewsFacetSourceBase::getQueryTypesForFacet in Core Views Facets 8

Returns the allowed query types for a given facet for the facet source.

Parameters

\Drupal\facets\FacetInterface $facet: The facet we should get query types for.

Return value

string[] array of allowed query types

Throws

\Drupal\facets\Exception\Exception An error when no query types are found.

Overrides FacetSourcePluginBase::getQueryTypesForFacet

File

src/Plugin/facets/facet_source/CoreViewsFacetSourceBase.php, line 209

Class

CoreViewsFacetSourceBase
Provide common functions for core Views based facet sources.

Namespace

Drupal\core_views_facets\Plugin\facets\facet_source

Code

public function getQueryTypesForFacet(FacetInterface $facet) {

  // We don't actually use this. Just put something that exists.
  return [
    'string' => 'search_api_string',
  ];
}