Same name and namespace in other branches
- 8.9.x core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module \theme_suggestions_test_theme_suggestions_alter()
- 9 core/modules/system/tests/modules/theme_suggestions_test/theme_suggestions_test.module \theme_suggestions_test_theme_suggestions_alter()
Implements hook_theme_suggestions_alter().
File
- core/
modules/ system/ tests/ modules/ theme_suggestions_test/ theme_suggestions_test.module, line 11 - Support module for testing theme suggestions.
Code
function theme_suggestions_test_theme_suggestions_alter(array &$suggestions, array &$variables, $hook) {
\Drupal::messenger()
->addStatus(__FUNCTION__ . '() executed.');
if ($hook == 'theme_test_general_suggestions') {
$suggestions[] = $hook . '__module_override';
$variables['module_hook'] = 'theme_suggestions_test_theme_suggestions_alter';
}
}