class FacetapiFilterCurrentDepth in Facet API 6.3
Same name and namespace in other branches
- 7.2 plugins/facetapi/filter.inc \FacetapiFilterCurrentDepth
- 7 plugins/facetapi/filter.inc \FacetapiFilterCurrentDepth
Plugin that filters all items not in lowest hierarchy.
Hierarchy
- class \FacetapiFilter
- class \FacetapiFilterCurrentDepth
Expanded class hierarchy of FacetapiFilterCurrentDepth
1 string reference to 'FacetapiFilterCurrentDepth'
- facetapi_facetapi_filters in ./
facetapi.facetapi.inc - Implements hook_facetapi_filters().
File
- plugins/
facetapi/ filter.inc, line 106 - Base filter class and implementation.
View source
class FacetapiFilterCurrentDepth extends FacetapiFilter {
/**
* Filters active facet items.
*/
public function execute(array $build) {
foreach ($build as $item) {
if ($item['#active'] && !empty($item['#item_children'])) {
return $this
->execute($item['#item_children']);
}
}
return $build;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FacetapiFilter:: |
protected | property | The adapter object. | |
FacetapiFilter:: |
protected | property | The ID of this plugin. | |
FacetapiFilter:: |
protected | property | The facet settings. | |
FacetapiFilter:: |
public | function | Returns default settings added to the settings form. | |
FacetapiFilter:: |
public | function | Adds settings to the filter form. | |
FacetapiFilter:: |
public | function | Initializes the filter object. | |
FacetapiFilterCurrentDepth:: |
public | function |
Filters active facet items. Overrides FacetapiFilter:: |