You are here

public function NodeController::addPageTitle in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::addPageTitle()

The _title_callback for the node.add route.

Parameters

\Drupal\node\NodeTypeInterface $node_type: The current node.

Return value

string The page title.

1 string reference to 'NodeController::addPageTitle'
node.routing.yml in core/modules/node/node.routing.yml
core/modules/node/node.routing.yml

File

core/modules/node/src/Controller/NodeController.php, line 282
Contains \Drupal\node\Controller\NodeController.

Class

NodeController
Returns responses for Node routes.

Namespace

Drupal\node\Controller

Code

public function addPageTitle(NodeTypeInterface $node_type) {
  return $this
    ->t('Create @name', array(
    '@name' => $node_type
      ->label(),
  ));
}