function FormAjaxException::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Form/FormAjaxException.php \Drupal\Core\Form\FormAjaxException::__construct()
  2. 10 core/lib/Drupal/Core/Form/FormAjaxException.php \Drupal\Core\Form\FormAjaxException::__construct()
  3. 11.x core/lib/Drupal/Core/Form/FormAjaxException.php \Drupal\Core\Form\FormAjaxException::__construct()

Constructs a FormAjaxException object.

Parameters

array $form: The form definition.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

string $message: (optional) The exception message.

int $code: (optional) A user defined exception code.

\Exception $previous: (optional) The previous exception for nested exceptions.

File

core/lib/Drupal/Core/Form/FormAjaxException.php, line 38

Class

FormAjaxException
Custom exception to break out of AJAX form processing.

Namespace

Drupal\Core\Form

Code

public function __construct(array $form, FormStateInterface $form_state, $message = "", $code = 0, \Exception $previous = NULL) {
    parent::__construct($message, $code, $previous);
    $this->form = $form;
    $this->formState = $form_state;
}

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