You are here

public function NodeRevisionRevertForm::buildForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Form/NodeRevisionRevertForm.php \Drupal\node\Form\NodeRevisionRevertForm::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 NodeRevisionRevertForm::buildForm()
NodeRevisionRevertTranslationForm::buildForm in core/modules/node/src/Form/NodeRevisionRevertTranslationForm.php
Form constructor.
1 method overrides NodeRevisionRevertForm::buildForm()
NodeRevisionRevertTranslationForm::buildForm in core/modules/node/src/Form/NodeRevisionRevertTranslationForm.php
Form constructor.

File

core/modules/node/src/Form/NodeRevisionRevertForm.php, line 105
Contains \Drupal\node\Form\NodeRevisionRevertForm.

Class

NodeRevisionRevertForm
Provides a form for reverting a node revision.

Namespace

Drupal\node\Form

Code

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