Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
entity
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
entity
Merge requests
!28
Remove duplicate 'version_history' starting in Drupal 10.1
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Remove duplicate 'version_history' starting in Drupal 10.1
issue/entity-3409152:3409152-remove-duplicate-version
into
8.x-1.x
Overview
0
Commits
2
Pipelines
2
Changes
1
Merged
Remove duplicate 'version_history' starting in Drupal 10.1
Lucas Hedding
requested to merge
issue/entity-3409152:3409152-remove-duplicate-version
into
8.x-1.x
Dec 15, 2023
Overview
0
Commits
2
Pipelines
2
Changes
1
Closes
#3409152
0
0
Merge request reports
Compare
8.x-1.x
version 3
b47722e9
Jun 1, 2024
version 2
5b0e0691
Dec 15, 2023
version 1
08e3d5cf
Dec 15, 2023
8.x-1.x (base)
and
latest version
latest version
b47722e9
2 commits,
Jun 1, 2024
version 3
b47722e9
2 commits,
Jun 1, 2024
version 2
5b0e0691
2 commits,
Dec 15, 2023
version 1
08e3d5cf
1 commit,
Dec 15, 2023
1 file
+
5
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Menu/DefaultEntityLocalTaskProvider.php
+
5
−
1
View file @ b47722e9
Edit in single-file editor
Open in Web IDE
Show full file
@@ -40,12 +40,16 @@ class DefaultEntityLocalTaskProvider implements EntityLocalTaskProviderInterface
public
function
buildLocalTasks
(
EntityTypeInterface
$entity_type
)
{
// Note: delete-form was intentionally omitted, to match core. See #1834002.
$link_templates
=
[];
foreach
([
'canonical'
,
'edit-form'
,
'duplicate-form'
,
'version-history'
]
as
$rel
)
{
foreach
([
'canonical'
,
'edit-form'
,
'duplicate-form'
]
as
$rel
)
{
if
(
$entity_type
->
hasLinkTemplate
(
$rel
))
{
$link_templates
[]
=
str_replace
(
'-'
,
'_'
,
$rel
);
}
}
if
(
version_compare
(
\Drupal
::
VERSION
,
10.1
,
'<'
)
&&
$entity_type
->
hasLinkTemplate
(
'version-history'
))
{
$link_templates
[]
=
'version_history'
;
}
$tasks
=
[];
if
(
count
(
$link_templates
)
>
1
)
{
$entity_type_id
=
$entity_type
->
id
();
Loading