You are here

function event_theme_suggestions_event in Event 8

Implements hook_theme_suggestions_HOOK().

File

./event.module, line 52
Contains event.module.

Code

function event_theme_suggestions_event(array $variables) {
  $suggestions = [];
  $entity = $variables['elements']['#event'];
  $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
  $suggestions[] = 'event__' . $sanitized_view_mode;
  $suggestions[] = 'event__' . $entity
    ->bundle();
  $suggestions[] = 'event__' . $entity
    ->bundle() . '__' . $sanitized_view_mode;
  $suggestions[] = 'event__' . $entity
    ->id();
  $suggestions[] = 'event__' . $entity
    ->id() . '__' . $sanitized_view_mode;
  return $suggestions;
}