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
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
Download
Patches
Plain diff
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
Lucas Hedding
requested to merge
issue/entity-3409152:3409152-remove-duplicate-version
into
8.x-1.x
1 year ago
Overview
0
Commits
2
Pipelines
2
Changes
1
Expand
Closes
#3409152
0
0
Merge request reports
Compare
8.x-1.x
version 3
b47722e9
10 months ago
version 2
5b0e0691
1 year ago
version 1
08e3d5cf
1 year ago
8.x-1.x (base)
and
latest version
latest version
b47722e9
2 commits,
10 months ago
version 3
b47722e9
2 commits,
10 months ago
version 2
5b0e0691
2 commits,
1 year ago
version 1
08e3d5cf
1 commit,
1 year ago
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
Options
@@ -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