8.3.x test_theme.theme test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook)
8.0.x test_theme.theme test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook)
8.1.x test_theme.theme test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook)
8.2.x test_theme.theme test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook)
8.4.x test_theme.theme test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook)

Implements hook_theme_suggestions_alter().

File

core/modules/system/tests/themes/test_theme/test_theme.theme, line 55
Theme to help test the Twig engine.

Code

function test_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
  drupal_set_message(__FUNCTION__ . '() executed.');
  // Theme alter hooks run after module alter hooks, so add this theme
  // suggestion to the beginning of the array so that the suggestion added by
  // the theme_suggestions_test module can be picked up when that module is
  // enabled.
  if ($hook == 'theme_test_general_suggestions') {
    array_unshift($suggestions, 'theme_test_general_suggestions__' . 'theme_override');
  }
}