You are here

protected function QueryTypePluginBase::getFacetOptions in Facets 8

Builds facet options that will be send to the backend.

Return value

array An array of default options for the facet.

4 calls to QueryTypePluginBase::getFacetOptions()
QueryTypeRangeBase::execute in src/QueryType/QueryTypeRangeBase.php
Adds facet info to the query using the backend native query object.
SearchApiGranular::getFacetOptions in src/Plugin/facets/query_type/SearchApiGranular.php
Builds facet options that will be send to the backend.
SearchApiRange::execute in src/Plugin/facets/query_type/SearchApiRange.php
Adds facet info to the query using the backend native query object.
SearchApiString::execute in src/Plugin/facets/query_type/SearchApiString.php
Adds facet info to the query using the backend native query object.
1 method overrides QueryTypePluginBase::getFacetOptions()
SearchApiGranular::getFacetOptions in src/Plugin/facets/query_type/SearchApiGranular.php
Builds facet options that will be send to the backend.

File

src/QueryType/QueryTypePluginBase.php, line 90

Class

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

Namespace

Drupal\facets\QueryType

Code

protected function getFacetOptions() {
  return [
    'field' => $this->facet
      ->getFieldIdentifier(),
    'limit' => $this->facet
      ->getHardLimit(),
    'operator' => $this->facet
      ->getQueryOperator(),
    'min_count' => $this->facet
      ->getMinCount(),
    'missing' => FALSE,
    'query_type' => $this
      ->getPluginId(),
  ];
}