Skip to content
Snippets Groups Projects
Commit b45f5d09 authored by Matt Biewener's avatar Matt Biewener
Browse files

Revert "Issue #3328538 by ras-ben, mlncn: workflow_buttons should only be...

Revert "Issue #3328538 by ras-ben, mlncn: workflow_buttons should only be loaded/load edit form when relevant"

This reverts commit 2c721806.
parent 3468fc98
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ function workflow_buttons_entity_extra_field_info() {
* Implements hook_entity_view().
*/
function workflow_buttons_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
if ($view_mode === 'full' && $display->getComponent('workflow_buttons')) {
if ($display->getComponent('workflow_buttons')) {
$form_state_additions = [
'workflow_buttons' => TRUE,
];
......@@ -114,10 +114,6 @@ function workflow_buttons_entity_view(array &$build, EntityInterface $entity, En
* https://www.drupal.org/forum/support/theme-development/2018-04-20/how-can-i-get-the-content_moderation_state-of-last#comment-12603894
*/
function workflow_buttons_preprocess_node(&$variables) {
if ($variables['view_mode'] !== 'full') {
return;
}
// Note: Access key booleans in Twig node templates like this:
// node.isDefaultRevision()
// node.isLatestRevision()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment