You are here

function site_settings_theme_suggestions_site_setting_entity in Site Settings and Labels 8

Implements hook_theme_suggestions_HOOK().

File

./site_settings.module, line 47
Contains site_settings.module..

Code

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