function TestThemeHooks::themeSuggestionsThemeTestSuggestionsAlter
Implements hook_theme_suggestions_HOOK_alter().
Attributes
#[Hook('theme_suggestions_theme_test_suggestions_alter')]
File
-
core/
modules/ system/ tests/ themes/ test_theme/ src/ Hook/ TestThemeHooks.php, line 82
Class
- TestThemeHooks
- Hook implementations for test_theme.
Namespace
Drupal\test_theme\HookCode
public function themeSuggestionsThemeTestSuggestionsAlter(array &$suggestions, array $variables) : void {
$this->messenger
->addStatus(__METHOD__ . '() 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.
array_unshift($suggestions, 'theme_test_suggestions__theme_override');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.