Skip to content
Snippets Groups Projects
Commit c25e896f authored by Adam Bramley's avatar Adam Bramley
Browse files

Issue #3024386: Deprecate NodePreviewController::title

parent e2774eb7
Branches
Tags
1 merge request!11774Issue #3024386: Deprecate NodePreviewController::title
......@@ -42,7 +42,6 @@ entity.node.preview:
path: '/node/preview/{node_preview}/{view_mode_id}'
defaults:
_controller: '\Drupal\node\Controller\NodePreviewController::view'
_title_callback: '\Drupal\node\Controller\NodePreviewController::title'
requirements:
_node_preview_access: '{node_preview}'
options:
......
......@@ -70,8 +70,13 @@ public function view(EntityInterface $node_preview, $view_mode_id = 'full', $lan
*
* @return string
* The page title.
*
* @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
*/
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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment