You are here

function pm_note_theme_suggestions_pm_note in Drupal PM (Project Management) 4.x

Implements hook_theme_suggestions_HOOK().

File

modules/pm_note/pm_note.module, line 47
Contains pm_note.module.

Code

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