function bibcite_entity_theme_suggestions_bibcite_keyword in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/bibcite_entity.module \bibcite_entity_theme_suggestions_bibcite_keyword()
Implements hook_theme_suggestions_bibcite_keyword().
File
- modules/
bibcite_entity/ bibcite_entity.module, line 269 - Module hooks.
Code
function bibcite_entity_theme_suggestions_bibcite_keyword(array $variables) {
$suggestions = [];
/** @var EntityInterface $entity */
$entity = $variables['elements']['#bibcite_keyword'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'bibcite_keyword__' . $sanitized_view_mode;
$suggestions[] = 'bibcite_keyword__' . $entity
->id();
$suggestions[] = 'bibcite_keyword__' . $entity
->id() . '__' . $sanitized_view_mode;
return $suggestions;
}