function ThemeSuggestionsTestHooks::themeSuggestionsAlter

Implements hook_theme_suggestions_alter().

File

core/modules/system/tests/modules/theme_suggestions_test/src/Hook/ThemeSuggestionsTestHooks.php, line 17

Class

ThemeSuggestionsTestHooks
Hook implementations for theme_suggestions_test.

Namespace

Drupal\theme_suggestions_test\Hook

Code

public function themeSuggestionsAlter(array &$suggestions, array &$variables, $hook) {
    \Drupal::messenger()->addStatus('theme_suggestions_test_theme_suggestions_alter' . '() executed.');
    if ($hook == 'theme_test_general_suggestions') {
        $suggestions[] = $hook . '__module_override';
        $variables['module_hook'] = 'theme_suggestions_test_theme_suggestions_alter';
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.