You are here

function flipping_book_theme_suggestions_flipping_book in Flipping Book 8

Implements hook_theme_suggestions_HOOK().

File

./flipping_book.module, line 50
Contains flipping_book.module..

Code

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