enforceRevisionsEntityFormAlter example

&& $this->moderationInfo->shouldModerateEntitiesOfBundle($bundle_of_entity_type$config_entity->id())) {
        $this->entityTypeManager->getHandler($bundle_of, 'moderation')->enforceRevisionsBundleFormAlter($form$form_state$form_id);
      }
    }
    elseif ($this->isModeratedEntityEditForm($form_object)) {
      /** @var \Drupal\Core\Entity\ContentEntityFormInterface $form_object */
      /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
      $entity = $form_object->getEntity();

      $this->entityTypeManager
        ->getHandler($entity->getEntityTypeId(), 'moderation')
        ->enforceRevisionsEntityFormAlter($form$form_state$form_id);

      // Submit handler to redirect to the latest version, if available.       $form['actions']['submit']['#submit'][] = [EntityTypeInfo::class, 'bundleFormRedirect'];

      // Move the 'moderation_state' field widget to the footer region, if       // available.       if (isset($form['footer']) && in_array($form_object->getOperation()['edit', 'default'], TRUE)) {
        $form['moderation_state']['#group'] = 'footer';
      }

      // If the publishing status exists in the meta region, replace it with
Home | Imprint | This part of the site doesn't use cookies.