function BlockContentModerationHandler::enforceRevisionsEntityFormAlter
Same name in other branches
- 8.9.x core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php \Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler::enforceRevisionsEntityFormAlter()
- 10 core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php \Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler::enforceRevisionsEntityFormAlter()
- 11.x core/modules/content_moderation/src/Entity/Handler/BlockContentModerationHandler.php \Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler::enforceRevisionsEntityFormAlter()
Overrides ModerationHandler::enforceRevisionsEntityFormAlter
File
-
core/
modules/ content_moderation/ src/ Entity/ Handler/ BlockContentModerationHandler.php, line 18
Class
- BlockContentModerationHandler
- Customizations for block content entities.
Namespace
Drupal\content_moderation\Entity\HandlerCode
public function enforceRevisionsEntityFormAlter(array &$form, FormStateInterface $form_state, $form_id) {
$form['revision']['#default_value'] = TRUE;
$form['revision']['#disabled'] = TRUE;
$form['revision']['#description'] = $this->t('Revisions must be required when moderation is enabled.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.