You are here

public function CurrentSearchItem::getFacetPath in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::getFacetPath()
  2. 7 contrib/current_search/plugins/current_search/item.inc \CurrentSearchItem::getFacetPath()

Helper function that returns a facet's path.

Ensures that all active child values are deactivated along with the parent.

Parameters

array $item: The item as returned by FacetapiAdapter::getAllActiveItems().

FacetapiAdapter $adapter: The adapter object of the current search.

Return value

string The facet path.

2 calls to CurrentSearchItem::getFacetPath()
CurrentSearchGroup::execute in contrib/current_search/plugins/current_search/item_group.inc
Implements CurrentSearchItem::execute().
CurrentSearchItemActive::execute in contrib/current_search/plugins/current_search/item_active.inc
Implements CurrentSearchItem::execute().

File

contrib/current_search/plugins/current_search/item.inc, line 290
Base current search item plugin class.

Class

CurrentSearchItem
Abstract class extended by current search item plugins.

Code

public function getFacetPath(array $item, FacetapiAdapter $adapter) {
  return $adapter
    ->getProcessor($item['facets'][0])
    ->getFacetPath($this
    ->getItemValues($item, $adapter), 1);
}