NodeRevisionRevertForm::buildForm

public NodeRevisionRevertForm::buildForm(array $form, FormStateInterface $form_state, $node_revision = NULL)

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

File

core/modules/node/src/Form/NodeRevisionRevertForm.php, line 100

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;
}
doc_Drupal
2016-10-29 09:31:08
Comments
Leave a Comment

Please login to continue.