You are here

MultiversionRevisionRevertForm.php in Multiversion 8

File

src/Form/MultiversionRevisionRevertForm.php
View source
<?php

namespace Drupal\multiversion\Form;

use Drupal\Core\Form\FormStateInterface;
use Drupal\node\Form\NodeRevisionRevertForm;

/**
 * Adds a flag when the entity is reverting.
 */
class MultiversionRevisionRevertForm extends NodeRevisionRevertForm {

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->revision->is_reverting = TRUE;
    parent::submitForm($form, $form_state);
  }

}

Classes

Namesort descending Description
MultiversionRevisionRevertForm Adds a flag when the entity is reverting.