function NodeModerationHandler::enforceRevisionsBundleFormAlter
Same name in other branches
- 9 core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter()
- 10 core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter()
- 11.x core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter()
Overrides ModerationHandler::enforceRevisionsBundleFormAlter
File
-
core/
modules/ content_moderation/ src/ Entity/ Handler/ NodeModerationHandler.php, line 55
Class
- NodeModerationHandler
- Customizations for node entities.
Namespace
Drupal\content_moderation\Entity\HandlerCode
public function enforceRevisionsBundleFormAlter(array &$form, FormStateInterface $form_state, $form_id) {
// Force the revision checkbox on.
$form['workflow']['options']['revision']['#value'] = 'revision';
$form['workflow']['options']['revision']['#disabled'] = TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.