function NodeViewController::title
Same name in other branches
- 9 core/modules/node/src/Controller/NodeViewController.php \Drupal\node\Controller\NodeViewController::title()
- 8.9.x core/modules/node/src/Controller/NodeViewController.php \Drupal\node\Controller\NodeViewController::title()
- 11.x core/modules/node/src/Controller/NodeViewController.php \Drupal\node\Controller\NodeViewController::title()
The _title_callback for the page that renders a single node.
Parameters
\Drupal\Core\Entity\EntityInterface $node: The current node.
Return value
string The page title.
File
-
core/
modules/ node/ src/ Controller/ NodeViewController.php, line 78
Class
- NodeViewController
- Defines a controller to render a single node.
Namespace
Drupal\node\ControllerCode
public function title(EntityInterface $node) {
return $this->entityRepository
->getTranslationFromContext($node)
->label();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.