class FormAjaxException extends Exception (View source)

Custom exception to break out of AJAX form processing.

Properties

protected array $form

The form definition.

protected FormStateInterface $formState

The form state.

Methods

__construct(array $form, FormStateInterface $form_state, string $message = "", int $code = 0, Exception $previous = NULL)

Constructs a FormAjaxException object.

array
getForm()

Gets the form definition.

getFormState()

Gets the form state.

Details

__construct(array $form, FormStateInterface $form_state, string $message = "", int $code = 0, Exception $previous = NULL)

Constructs a FormAjaxException object.

Parameters

array $form

The form definition.

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.

array getForm()

Gets the form definition.

Return Value

array

The form structure.

FormStateInterface getFormState()

Gets the form state.

Return Value

FormStateInterface

The current state of the form.