extends |
BaseEvent |
|---|---|
implements |
GenericEventInterface, StoppableEventInterface, FormEventInterface |
uses |
GenericEventTrait, StoppableEventTrait |
A generic event used to process a submitted form. This includes validating whether the data submitted in a form is valid as well as processing submitted data.
If a validation error is encountered, call setInvalid() . Validation messages can be added using addMessage() .
This event implements StoppableEventInterface, which stops further
processing of the form. The documentation of the specific event should
specify when processing should be stopped - an invalid validation
result is not sufficient reason for further processing to be stopped.
| Methods | ||
|---|---|---|
public
|
__construct(FormState $form_state, string $eventName = null)
|
# |
public
|
getFormState()
|
# |
public
|
addMessage(string $message): void
|
# |
public
|
getMessages(): array<string>
|
# |
public
|
setInvalid(): void
|
# |
public
|
isValid(): bool
|
# |
| Methods used from SimpleID\Util\Events\GenericEventTrait |
|---|
setEventName(), getEventName() |
| Methods used from SimpleID\Util\Events\StoppableEventTrait |
|---|
isPropagationStopped(), stopPropagation() |
| Properties | |||
|---|---|---|---|
protected
|
FormState
|
$form_state
|
# |
protected
|
bool
|
$is_valid = true
|
# |
protected
|
array<string>
|
$messages = []
|
# |
| Properties used from SimpleID\Util\Events\GenericEventTrait |
|---|
$eventName |
| Properties used from SimpleID\Util\Events\StoppableEventTrait |
|---|
$stopped |