function _search_api_preserve_views_facets in Search API 7
Checks whether "Preserve facets" option is enabled on the given view.
If the view display is overridden, use its configuration. Otherwise, use the default configuration.
Parameters
view $view: The search view.
Return value
bool TRUE if "Preserve facets" is enabled, FALSE otherwise.
1 call to _search_api_preserve_views_facets()
- search_api_facetapi_form_views_exposed_form_alter in contrib/
search_api_facetapi/ search_api_facetapi.module - Implements hook_form_FORM_ID_alter() for views_exposed_form().
File
- contrib/
search_api_facetapi/ search_api_facetapi.module, line 591 - Integrates the Search API with the Facet API.
Code
function _search_api_preserve_views_facets(view $view) {
$query_options = $view->display_handler
->get_option('query');
return !empty($query_options['options']['preserve_facet_query_args']);
}