You are here

public function DefaultFacetManager::updateResults in Facets 8

Updates all facets of a given facet source with the results.

Parameters

string $facetsource_id: The facet source ID of the currently processed facet.

1 call to DefaultFacetManager::updateResults()
DefaultFacetManager::processFacets in src/FacetManager/DefaultFacetManager.php
Initializes facet builds, sets the breadcrumb trail.

File

src/FacetManager/DefaultFacetManager.php, line 372

Class

DefaultFacetManager
The facet manager.

Namespace

Drupal\facets\FacetManager

Code

public function updateResults($facetsource_id) {
  $facets = $this
    ->getFacetsByFacetSourceId($facetsource_id);
  if ($facets) {

    /** @var \drupal\facets\FacetSource\FacetSourcePluginInterface $facet_source_plugin */
    $facet_source_plugin = $this->facetSourcePluginManager
      ->createInstance($facetsource_id);
    $facet_source_plugin
      ->fillFacetsWithResults($facets);
  }
}