function ThemeTestController::preprocessSuggestions

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::preprocessSuggestions()
  2. 10 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::preprocessSuggestions()
  3. 11.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController::preprocessSuggestions()

Controller for testing preprocess functions with theme suggestions.

1 string reference to 'ThemeTestController::preprocessSuggestions'
theme_test.routing.yml in core/modules/system/tests/modules/theme_test/theme_test.routing.yml
core/modules/system/tests/modules/theme_test/theme_test.routing.yml

File

core/modules/system/tests/modules/theme_test/src/ThemeTestController.php, line 117

Class

ThemeTestController
Controller routines for theme test routes.

Namespace

Drupal\theme_test

Code

public function preprocessSuggestions() {
    return [
        [
            '#theme' => 'theme_test_preprocess_suggestions',
            '#foo' => 'suggestion',
        ],
        [
            '#theme' => 'theme_test_preprocess_suggestions',
            '#foo' => 'kitten',
        ],
        [
            '#theme' => 'theme_test_preprocess_suggestions',
            '#foo' => 'monkey',
        ],
        [
            '#theme' => 'theme_test_preprocess_suggestions__kitten__flamingo',
        ],
    ];
}

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