public function FacetapiFacetProcessor::process in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/adapter.inc \FacetapiFacetProcessor::process()
- 7 plugins/facetapi/adapter.inc \FacetapiFacetProcessor::process()
Processes the facet items.
File
- plugins/
facetapi/ adapter.inc, line 1133 - Adapter plugin and adapter related calsses.
Class
- FacetapiFacetProcessor
- Processes facets, initializes the build.
Code
public function process() {
$this->build = array();
// Only initializes facet if a query type plugin is registered for it.
// NOTE: We don't use the chaining pattern so the methods can be tested.
if ($this->facet
->getAdapter()
->getFacetQuery($this->facet
->getFacet())) {
$this->build = $this
->initializeBuild($this->build);
$this->build = $this
->mapValues($this->build);
if ($this->build) {
$settings = $this->facet
->getSettings();
if (!$settings->settings['flatten']) {
$this->build = $this
->processHierarchy($this->build);
}
$this
->processQueryStrings($this->build);
}
}
}