You are here

public function BuildDemo::rebuildFormSubmit in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 form_api_example/src/Form/BuildDemo.php \Drupal\form_api_example\Form\BuildDemo::rebuildFormSubmit()

Implements submit callback for Rebuild button.

Parameters

array $form: Form render array.

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

File

modules/form_api_example/src/Form/BuildDemo.php, line 153

Class

BuildDemo
Implements the build demo form controller.

Namespace

Drupal\form_api_example\Form

Code

public function rebuildFormSubmit(array &$form, FormStateInterface $form_state) {
  $this
    ->displayMethodInvocation('rebuildFormSubmit');
  $form_state
    ->setRebuild(TRUE);
}