function TourTestController::tourTest1
Same name in other branches
- 9 core/modules/tour/tests/tour_test/src/Controller/TourTestController.php \Drupal\tour_test\Controller\TourTestController::tourTest1()
- 8.9.x core/modules/tour/tests/tour_test/src/Controller/TourTestController.php \Drupal\tour_test\Controller\TourTestController::tourTest1()
- 10 core/modules/tour/tests/tour_test/src/Controller/TourTestController.php \Drupal\tour_test\Controller\TourTestController::tourTest1()
Outputs some content for testing tours.
Parameters
string $locale: (optional) Dummy locale variable for testing routing parameters. Defaults to 'foo'.
Return value
array Array of markup.
1 string reference to 'TourTestController::tourTest1'
- tour_test.routing.yml in core/
modules/ tour/ tests/ tour_test/ tour_test.routing.yml - core/modules/tour/tests/tour_test/tour_test.routing.yml
File
-
core/
modules/ tour/ tests/ tour_test/ src/ Controller/ TourTestController.php, line 20
Class
- TourTestController
- Controller routines for tour_test routes.
Namespace
Drupal\tour_test\ControllerCode
public function tourTest1($locale = 'foo') {
return [
'tip-1' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tour-test-1',
],
'#children' => t('Where does the rain in Spain fail?'),
],
'tip-3' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tour-test-3',
],
'#children' => t('Tip created now?'),
],
'tip-4' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tour-test-4',
],
'#children' => t('Tip created later?'),
],
'tip-5' => [
'#type' => 'container',
'#attributes' => [
'class' => [
'tour-test-5',
],
],
'#children' => t('Tip created later?'),
],
'code-tip-1' => [
'#type' => 'container',
'#attributes' => [
'id' => 'tour-code-test-1',
],
'#children' => t('Tip created now?'),
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.