You are here

public function MenuTestController::titleCallback in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php \Drupal\menu_test\Controller\MenuTestController::titleCallback()

A title callback method for test routes.

Parameters

array $_title_arguments: Optional array from the route defaults.

string $_title: Optional _title string from the route defaults.

Return value

string The route title.

1 string reference to 'MenuTestController::titleCallback'
menu_test.routing.yml in core/modules/system/tests/modules/menu_test/menu_test.routing.yml
core/modules/system/tests/modules/menu_test/menu_test.routing.yml

File

core/modules/system/tests/modules/menu_test/src/Controller/MenuTestController.php, line 91
Contains \Drupal\menu_test\Controller\MenuTestController.

Class

MenuTestController
Controller routines for menu_test routes.

Namespace

Drupal\menu_test\Controller

Code

public function titleCallback(array $_title_arguments = array(), $_title = '') {
  $_title_arguments += array(
    'case_number' => '2',
    'title' => $_title,
  );
  return t($_title_arguments['title']) . ' - Case ' . $_title_arguments['case_number'];
}