function PageExampleController::simple

Same name in other branches
  1. 4.0.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 modules/page_example/page_example.routing.yml
modules/page_example/page_example.routing.yml

File

modules/page_example/src/Controller/PageExampleController.php, line 33

Class

PageExampleController
Controller routines for page example routes.

Namespace

Drupal\page_example\Controller

Code

public function simple() {
    return [
        '#markup' => '<p>' . $this->t('Simple page: The quick brown fox jumps over the lazy dog.') . '</p>',
    ];
}