You are here

public function MenuExampleController::titleCallbackContent in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/menu_example/src/Controller/MenuExampleController.php \Drupal\menu_example\Controller\MenuExampleController::titleCallbackContent()

Demonstrate generation of dynamic creation of page title.

See also

\Drupal\menu_example\Controller\MenuExampleController::backTitle()

1 string reference to 'MenuExampleController::titleCallbackContent'
menu_example.routing.yml in menu_example/menu_example.routing.yml
menu_example/menu_example.routing.yml

File

menu_example/src/Controller/MenuExampleController.php, line 205

Class

MenuExampleController
Controller routines for menu example routes.

Namespace

Drupal\menu_example\Controller

Code

public function titleCallbackContent() {
  return [
    '#markup' => $this
      ->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),
  ];
}