class TestPageTestController in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php \Drupal\test_page_test\Controller\TestPageTestController
- 10 core/modules/system/tests/modules/test_page_test/src/Controller/TestPageTestController.php \Drupal\test_page_test\Controller\TestPageTestController
Controller routines for test_page_test routes.
Hierarchy
- class \Drupal\test_page_test\Controller\TestPageTestController
Expanded class hierarchy of TestPageTestController
File
- core/
modules/ system/ tests/ modules/ test_page_test/ src/ Controller/ TestPageTestController.php, line 8
Namespace
Drupal\test_page_test\ControllerView source
class TestPageTestController {
/**
* Returns a test page and sets the title.
*/
public function testPage() {
$link_text = t('Visually identical test links');
return [
'#title' => t('Test page'),
'#markup' => t('Test page text.') . "<a href=\"/user/login\">{$link_text}</a><a href=\"/user/register\">{$link_text}</a>",
'#attached' => [
'drupalSettings' => [
'test-setting' => 'azAZ09();.,\\\\/-_{}',
],
],
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestPageTestController:: |
public | function | Returns a test page and sets the title. |