function Callbacks::userRegisterFormRebuild

Submit callback that just lets the form rebuild.

File

core/modules/system/tests/modules/form_test/src/Callbacks.php, line 99

Class

Callbacks
Simple class for testing methods as Form API callbacks.

Namespace

Drupal\form_test

Code

public static function userRegisterFormRebuild(array $form, FormStateInterface $form_state) : void {
  \Drupal::messenger()->addStatus('Form rebuilt.');
  $form_state->setRebuild();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.