You are here

public function SearchApiFacetSourceInterface::getViewsDisplay in Facets 8

Retrieves the Views entity with the correct display set.

This returns NULL when the facet source is not based on views. If it is, it returns a ViewsExecutable plugin with the correct display already set.

Return value

\Drupal\views\ViewExecutable|null NULL when the view can't be found or loaded, the view with preset display otherwise.

2 methods override SearchApiFacetSourceInterface::getViewsDisplay()
SearchApiBaseFacetSource::getViewsDisplay in src/Plugin/facets/facet_source/SearchApiBaseFacetSource.php
Retrieves the Views entity with the correct display set.
SearchApiDisplay::getViewsDisplay in src/Plugin/facets/facet_source/SearchApiDisplay.php
Retrieves the Views entity with the correct display set.

File

src/FacetSource/SearchApiFacetSourceInterface.php, line 36

Class

SearchApiFacetSourceInterface
A facet source that uses Search API as a base.

Namespace

Drupal\facets\FacetSource

Code

public function getViewsDisplay();