function NodeController::revisionPageTitle
Same name in other branches
- 8.9.x core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::revisionPageTitle()
- 10 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::revisionPageTitle()
- 11.x core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::revisionPageTitle()
Page title callback for a node revision.
Parameters
\Drupal\node\NodeInterface $node_revision: The node revision.
Return value
string The page title.
1 string reference to 'NodeController::revisionPageTitle'
- 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 140
Class
- NodeController
- Returns responses for Node routes.
Namespace
Drupal\node\ControllerCode
public function revisionPageTitle(NodeInterface $node_revision) {
return $this->t('Revision of %title from %date', [
'%title' => $node_revision->label(),
'%date' => $this->dateFormatter
->format($node_revision->getRevisionCreationTime()),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.