You are here

public function NodeRevisionRevertDefaultForm::buildForm in Thunder 6.0.x

Same name and namespace in other branches
  1. 8.5 modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::buildForm()
  2. 8.2 modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::buildForm()
  3. 8.3 modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::buildForm()
  4. 8.4 modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::buildForm()
  5. 6.2.x modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::buildForm()
  6. 6.1.x modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php \Drupal\thunder_article\Form\NodeRevisionRevertDefaultForm::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 NodeRevisionRevertForm::buildForm

File

modules/thunder_article/src/Form/NodeRevisionRevertDefaultForm.php, line 42

Class

NodeRevisionRevertDefaultForm
Provides a form for reverting a node revision.

Namespace

Drupal\thunder_article\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $node = NULL) {
  $this->revision = $this->nodeStorage
    ->load($node);
  $form = ConfirmFormBase::buildForm($form, $form_state);
  return $form;
}