function NodePreviewController::title
Same name and namespace in other branches
- 9 core/modules/node/src/Controller/NodePreviewController.php \Drupal\node\Controller\NodePreviewController::title()
- 8.9.x core/modules/node/src/Controller/NodePreviewController.php \Drupal\node\Controller\NodePreviewController::title()
- 10 core/modules/node/src/Controller/NodePreviewController.php \Drupal\node\Controller\NodePreviewController::title()
The _title_callback for the page that renders a single node in preview.
Parameters
\Drupal\Core\Entity\EntityInterface $node_preview: The current node.
Return value
string The page title.
Deprecated
in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/node/3518065
File
-
core/
modules/ node/ src/ Controller/ NodePreviewController.php, line 78
Class
- NodePreviewController
- Defines a controller to render a single node in preview.
Namespace
Drupal\node\ControllerCode
public function title(EntityInterface $node_preview) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3518065', E_USER_DEPRECATED);
return $this->entityRepository
->getTranslationFromContext($node_preview)
->label();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.