You are here

public function FacetapiAdapter::processFacets in Facet API 6.3

Same name and namespace in other branches
  1. 7.2 plugins/facetapi/adapter.inc \FacetapiAdapter::processFacets()
  2. 7 plugins/facetapi/adapter.inc \FacetapiAdapter::processFacets()

Initializes facet builds, adds breadcrumb trail.

1 call to FacetapiAdapter::processFacets()
FacetapiAdapter::buildRealm in plugins/facetapi/adapter.inc
Builds the render array for facets in a realm.

File

plugins/facetapi/adapter.inc, line 787
Adapter plugin and adapter related calsses.

Class

FacetapiAdapter
Abstract class extended by search backends that retrieves facet information from the database.

Code

public function processFacets() {
  if (!$this->processed) {
    $this->processed = TRUE;

    // Initializes each facet's render array.
    foreach ($this
      ->getEnabledFacets() as $facet) {
      $processor = new FacetapiFacetProcessor($this
        ->getFacet($facet));
      $this->processors[$facet['name']] = $processor;
      $this->processors[$facet['name']]
        ->process();
    }

    // Sets the breadcrumb trail if a search was executed.
    if ($this
      ->searchExecuted()) {
      $this->urlProcessor
        ->setBreadcrumb();
    }
  }
}