You are here

public function MediaRevisionRevertForm::buildForm in Media Revisions UI 8

Same name and namespace in other branches
  1. 2.0.x src/Form/MediaRevisionRevertForm.php \Drupal\media_revisions_ui\Form\MediaRevisionRevertForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfirmFormBase::buildForm

1 call to MediaRevisionRevertForm::buildForm()
MediaRevisionRevertTranslationForm::buildForm in src/Form/MediaRevisionRevertTranslationForm.php
Form constructor.
1 method overrides MediaRevisionRevertForm::buildForm()
MediaRevisionRevertTranslationForm::buildForm in src/Form/MediaRevisionRevertTranslationForm.php
Form constructor.

File

src/Form/MediaRevisionRevertForm.php, line 112

Class

MediaRevisionRevertForm
Provides a form for reverting media revision.

Namespace

Drupal\media_revisions_ui\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $media_revision = NULL) {
  $this->revision = $this->mediaStorage
    ->loadRevision($media_revision);
  $form = parent::buildForm($form, $form_state);
  return $form;
}