public function PageExampleController::simple in Examples for Developers 8
Same name and namespace in other branches
- 3.x modules/page_example/src/Controller/PageExampleController.php \Drupal\page_example\Controller\PageExampleController::simple()
Constructs a simple page.
The router _controller callback, maps the path 'examples/page-example/simple' to this method.
_controller callbacks return a renderable array for the content area of the page. The theme system will later render and surround the content with the appropriate blocks, navigation, and styling.
1 string reference to 'PageExampleController::simple'
- page_example.routing.yml in page_example/
page_example.routing.yml - page_example/page_example.routing.yml
File
- page_example/
src/ Controller/ PageExampleController.php, line 33
Class
- PageExampleController
- Controller routines for page example routes.
Namespace
Drupal\page_example\ControllerCode
public function simple() {
return [
'#markup' => '<p>' . $this
->t('Simple page: The quick brown fox jumps over the lazy dog.') . '</p>',
];
}