Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
workflow_buttons
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
workflow_buttons
Merge requests
!10
Issue
#3386885
: Show buttons on Custom Entity view pages (replacement for Moderation control pseudofield)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3386885
: Show buttons on Custom Entity view pages (replacement for Moderation control pseudofield)
issue/workflow_buttons-3386885:3386885-show-buttons-on
into
8.x-1.x
Overview
0
Commits
2
Pipelines
2
Changes
2
Merged
Bob McDonald
requested to merge
issue/workflow_buttons-3386885:3386885-show-buttons-on
into
8.x-1.x
1 year ago
Overview
0
Commits
2
Pipelines
2
Changes
2
Expand
0
0
Merge request reports
Compare
8.x-1.x
version 2
b1d5677f
1 year ago
version 1
8d891246
1 year ago
8.x-1.x (base)
and
latest version
latest version
b1d5677f
2 commits,
1 year ago
version 2
b1d5677f
2 commits,
1 year ago
version 1
8d891246
1 commit,
1 year ago
2 files
+
41
−
34
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Plugin/Field/FieldWidget/WorkflowButtonsWidget.php
+
2
−
7
Options
@@ -339,13 +339,8 @@ class WorkflowButtonsWidget extends OptionsSelectWidget implements ContainerFact
}
}
// Only include one set of buttons if on a node view or revision route.
$routes_list
=
[
'entity.node.canonical'
,
'entity.node.revision'
,
'entity.node.latest_version'
,
];
if
(
in_array
(
\Drupal
::
routeMatch
()
->
getRouteName
(),
$routes_list
))
{
// Only include one set of buttons if on a entity view or revision route.
if
(
$form_state
->
get
(
'workflow_buttons'
))
{
unset
(
$form
[
'actions_top'
]);
}
Loading