class TestDeprecatedSuggestionThemeHooks
Same name and namespace in other branches
- main core/modules/system/tests/themes/test_deprecated_suggestion_theme/src/Hook/TestDeprecatedSuggestionThemeHooks.php \Drupal\test_deprecated_suggestion_theme\Hook\TestDeprecatedSuggestionThemeHooks
Hook implementations for test_deprecated_suggestion_theme.
Hierarchy
- class \Drupal\test_deprecated_suggestion_theme\Hook\TestDeprecatedSuggestionThemeHooks
Expanded class hierarchy of TestDeprecatedSuggestionThemeHooks
File
-
core/
modules/ system/ tests/ themes/ test_deprecated_suggestion_theme/ src/ Hook/ TestDeprecatedSuggestionThemeHooks.php, line 12
Namespace
Drupal\test_deprecated_suggestion_theme\HookView source
class TestDeprecatedSuggestionThemeHooks {
/**
* Implements hook_theme_suggestions_alter().
*/
public function themeSuggestionsAlter(array &$suggestions, array $variables, $hook) : void {
\Drupal::messenger()->addStatus('test_deprecated_suggestion_theme_theme_suggestions_alter() executed for ' . $hook . '.');
if ($hook == 'theme_test_suggestion_provided') {
// Add a deprecated suggestion.
$suggestions[] = 'theme_test_suggestion_provided__deprecated';
$suggestions['__DEPRECATED']['theme_test_suggestion_provided__deprecated'] = 'Theme suggestion theme_test_suggestion_provided__deprecated is deprecated in drupal:X.0.0 and is removed from drupal:Y.0.0. This is a test.';
}
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| TestDeprecatedSuggestionThemeHooks::themeSuggestionsAlter | public | function | Implements hook_theme_suggestions_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.