function hook_facetapi_enabled_facets_alter in Facet API 7
Same name and namespace in other branches
- 7.2 facetapi.api.php \hook_facetapi_enabled_facets_alter()
Allows for alterations of the facets on the fly, without caching.
Parameters
array &$enabled_facets: The return facets, which enabled for current search.
$searcher: The machine readable name of the searcher.
$realm_name: The machine readable name of the realm.
1 invocation of hook_facetapi_enabled_facets_alter()
- facetapi_get_enabled_facets in ./
facetapi.module - Returns all enabled facet definitions available to the searcher.
File
- ./
facetapi.api.php, line 258 - Hooks provided by the Facet API module.
Code
function hook_facetapi_enabled_facets_alter(array &$enabled_facets, $searcher, $realm_name) {
if ($searcher == 'something') {
// Put facet1 to the end.
if (!empty($enabled_facets['facet1'])) {
$facet1 = $enabled_facets['facet1'];
unset($enabled_facets['facet1']);
$enabled_facets['facet1'] = $facet1;
}
}
}