Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
c25e896f
Commit
c25e896f
authored
1 month ago
by
Adam Bramley
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3024386
: Deprecate NodePreviewController::title
parent
e2774eb7
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!11774
Issue #3024386: Deprecate NodePreviewController::title
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/modules/node/node.routing.yml
+0
-1
0 additions, 1 deletion
core/modules/node/node.routing.yml
core/modules/node/src/Controller/NodePreviewController.php
+5
-0
5 additions, 0 deletions
core/modules/node/src/Controller/NodePreviewController.php
with
5 additions
and
1 deletion
core/modules/node/node.routing.yml
+
0
−
1
View file @
c25e896f
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
core/modules/node/src/Controller/NodePreviewController.php
+
5
−
0
View file @
c25e896f
...
...
@@ -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
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment