function apachesolr_set_facetapi_breadcrumb in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 apachesolr.module \apachesolr_set_facetapi_breadcrumb()
- 7 apachesolr.module \apachesolr_set_facetapi_breadcrumb()
Sets breadcrumb trails for Facet API settings forms.
Parameters
FacetapiAdapter $adapter: The Facet API adapter object.
array $realm: The realm definition.
2 calls to apachesolr_set_facetapi_breadcrumb()
- apachesolr_form_facetapi_facet_dependencies_form_alter in ./
apachesolr.module - Implements hook_form_[form_id]_alter(). (D7)
- apachesolr_form_facetapi_facet_settings_form_alter in ./
apachesolr.module - Implements hook_form_[form_id]_alter(). (D7)
File
- ./
apachesolr.module, line 1050 - Integration with the Apache Solr search application.
Code
function apachesolr_set_facetapi_breadcrumb(FacetapiAdapter $adapter, array $realm) {
if ('apachesolr' == $adapter
->getId()) {
// Hack here that depnds on our construction of the searcher name in this way.
list(, $env_id) = explode('@', $adapter
->getSearcher());
// Appends additional breadcrumb items.
$breadcrumb = drupal_get_breadcrumb();
$breadcrumb[] = l(t('Apache Solr search environment edit'), 'admin/config/search/apachesolr/settings/' . $env_id);
$breadcrumb[] = l($realm['label'], 'admin/config/search/apachesolr/settings/' . $env_id . '/facets/' . $realm['name']);
drupal_set_breadcrumb($breadcrumb);
}
}