You are here

function facets_theme_suggestions_facets_result_item in Facets 8

Implements hook_theme_suggestions_HOOK().

File

./facets.module, line 364
Contains facets.module.

Code

function facets_theme_suggestions_facets_result_item(array $variables) {
  $suggestions = [];
  $facet = $variables['facet'];
  if ($facet instanceof FacetInterface) {
    $suggestions[] = 'facets_result_item__' . $facet
      ->getWidget()['type'];
    $suggestions[] = 'facets_result_item__' . $facet
      ->getWidget()['type'] . '__' . $facet
      ->id();
  }
  return $suggestions;
}