function TestThemeHooks::themeSuggestionsNodeAlter
Implements hook_theme_suggestions_HOOK_alter().
Attributes
#[Hook('theme_suggestions_node_alter')]
File
-
core/
modules/ system/ tests/ themes/ test_theme/ src/ Hook/ TestThemeHooks.php, line 95
Class
- TestThemeHooks
- Hook implementations for test_theme.
Namespace
Drupal\test_theme\HookCode
public function themeSuggestionsNodeAlter(array &$suggestions, array $variables) : void {
// Add an invalid suggestion to be tested.
$suggestions[] = 'invalid_theme_suggestions';
$this->messenger
->addStatus(__METHOD__ . '() executed.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.