function ajax_facets_preprocess_panels_pane in Ajax facets 7.3
Implements hook_preprocess_panels_pane().
File
- includes/
ajax_facets.block.inc, line 186 - Functions, related with block API.
Code
function ajax_facets_preprocess_panels_pane(&$variables) {
// Add special class to identify panels pane as block by module ajax facets.
if (!empty($variables['content']['#facet'])) {
// subtype should contain something like "facetapi-ZsnSXo0R09p45W7e4f70B4qN67wJgjZQ".
if (!empty($variables['pane']->subtype)) {
// Add BEM style class to facet block.
// This class is using to show hidden facet block.
$variables['classes_array'][] = 'block--ajax_facets';
// We set class but not ID, because drupal blocks have such ID by default,
// but panes can have other ID and it can be a cause of potential problems.
$variables['classes_array'][] = strtolower("block-{$variables['pane']->subtype}");
}
}
}