public function NodeModerationHandler::enforceRevisionsEntityFormAlter in Drupal 10
Same name and namespace in other branches
- 8 core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsEntityFormAlter()
- 9 core/modules/content_moderation/src/Entity/Handler/NodeModerationHandler.php \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsEntityFormAlter()
File
- core/
modules/ content_moderation/ src/ Entity/ Handler/ NodeModerationHandler.php, line 46
Class
- NodeModerationHandler
- Customizations for node entities.
Namespace
Drupal\content_moderation\Entity\HandlerCode
public function enforceRevisionsEntityFormAlter(array &$form, FormStateInterface $form_state, $form_id) {
$form['revision']['#disabled'] = TRUE;
$form['revision']['#default_value'] = TRUE;
$form['revision']['#description'] = $this
->t('Revisions are required.');
}