function NodeController::addPageTitle
Same name in other branches
- 9 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::addPageTitle()
- 8.9.x core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::addPageTitle()
- 11.x 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 273
Class
- NodeController
- Returns responses for Node routes.
Namespace
Drupal\node\ControllerCode
public function addPageTitle(NodeTypeInterface $node_type) {
return $this->t('Create @name', [
'@name' => $node_type->label(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.