Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
43ea4e80
Verified
Commit
43ea4e80
authored
Jan 25, 2023
by
Alex Pott
Browse files
Issue
#2410739
by maliknaik, daffie: Call to label() in the wrong place in NodeDeleteForm
parent
0891913c
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/node/src/Form/NodeDeleteForm.php
View file @
43ea4e80
...
...
@@ -19,18 +19,18 @@ protected function getDeletionMessage() {
$entity
=
$this
->
getEntity
();
$node_type_storage
=
$this
->
entityTypeManager
->
getStorage
(
'node_type'
);
$node_type
=
$node_type_storage
->
load
(
$entity
->
bundle
())
->
label
()
;
$node_type
=
$node_type_storage
->
load
(
$entity
->
bundle
());
if
(
!
$entity
->
isDefaultTranslation
())
{
return
$this
->
t
(
'@language translation of the @type %label has been deleted.'
,
[
'@language'
=>
$entity
->
language
()
->
getName
(),
'@type'
=>
$node_type
,
'@type'
=>
$node_type
->
label
()
,
'%label'
=>
$entity
->
label
(),
]);
}
return
$this
->
t
(
'The @type %title has been deleted.'
,
[
'@type'
=>
$node_type
,
'@type'
=>
$node_type
->
label
()
,
'%title'
=>
$this
->
getEntity
()
->
label
(),
]);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment