summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/src/Entity
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-08-05 00:40:56 (GMT)
committerNathaniel Catchpole2017-08-05 00:40:56 (GMT)
commit42c492cd7062a9826d4a8222c2d9757a16bbacc9 (patch)
tree6718d0dad203937fd1f80b13a63f812885ab45ef /core/modules/content_moderation/src/Entity
parentd9247c2ee0947991f18ab540959bb4bea797d65d (diff)
Issue #2892967 by amateescu, Sam152: \Drupal\content_moderation\EntityTypeInfo::formAlter() is half broken
Diffstat (limited to 'core/modules/content_moderation/src/Entity')
-rw-r--r--core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php b/core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php
index 53bb80a..1e1c6f6 100644
--- a/core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php
+++ b/core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php
@@ -51,14 +51,9 @@ class NodeModerationHandler extends ModerationHandler {
* {@inheritdoc}
*/
public function enforceRevisionsBundleFormAlter(array &$form, FormStateInterface $form_state, $form_id) {
- /* @var \Drupal\node\Entity\NodeType $entity */
- $entity = $form_state->getFormObject()->getEntity();
-
- if ($this->moderationInfo->getWorkflowForEntity($entity)) {
- // Force the revision checkbox on.
- $form['workflow']['options']['#default_value']['revision'] = 'revision';
- $form['workflow']['options']['revision']['#disabled'] = TRUE;
- }
+ // Force the revision checkbox on.
+ $form['workflow']['options']['#default_value']['revision'] = 'revision';
+ $form['workflow']['options']['revision']['#disabled'] = TRUE;
}
}