You are here

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

Implements hook_theme_suggestions_HOOK().

File

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

Code

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