class ThemeTestController
Same name in this branch
- 9 core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/theme_test/src/ThemeTestController.php \Drupal\theme_test\ThemeTestController
Controller routines for test routes for legacy theme functions.
@todo Remove in https://www.drupal.org/project/drupal/issues/3097889
Hierarchy
- class \Drupal\Core\Controller\ControllerBase extends \Drupal\Core\DependencyInjection\ContainerInjectionInterface uses \Drupal\Core\Logger\LoggerChannelTrait, \Drupal\Core\Messenger\MessengerTrait, \Drupal\Core\Routing\RedirectDestinationTrait, \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\theme_legacy_test\ThemeTestController implements \Drupal\Core\Controller\ControllerBase
Expanded class hierarchy of ThemeTestController
File
-
core/
modules/ system/ tests/ modules/ theme_legacy_test/ src/ ThemeTestController.php, line 12
Namespace
Drupal\theme_legacy_testView source
class ThemeTestController extends ControllerBase {
/**
* A theme template that overrides a theme function.
*
* @return array
* Render array containing a theme.
*/
public function functionTemplateOverridden() {
return [
'#theme' => 'theme_test_function_template_override',
];
}
/**
* Menu callback for testing suggestion alter hooks with theme functions.
*/
public function functionSuggestionAlter() {
return [
'#theme' => 'theme_test_function_suggestions',
];
}
/**
* Menu callback for testing includes with suggestion alter hooks.
*/
public function suggestionAlterInclude() {
return [
'#theme' => 'theme_test_suggestions_include',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.