FormError
class FormError implements Serializable
Wraps errors in forms.
Methods
Constructor.
Returns the error message.
Returns the error message template.
Returns the parameters to be inserted in the message template.
Returns the value for error message pluralization.
Returns the cause of this error.
Returns the form that caused this error.
Serializes this error.
Unserializes a serialized error.
Details
at line line 78
__construct(string $message, string|null $messageTemplate = null, array $messageParameters = array(), int|null $messagePluralization = null, mixed $cause = null)
Constructor.
Any array key in $messageParameters will be used as a placeholder in $messageTemplate.
at line line 92
string
getMessage()
Returns the error message.
at line line 102
string
getMessageTemplate()
Returns the error message template.
at line line 112
array
getMessageParameters()
Returns the parameters to be inserted in the message template.
at line line 122
int|null
getMessagePluralization()
Returns the value for error message pluralization.
at line line 132
mixed
getCause()
Returns the cause of this error.
at line line 146
setOrigin(FormInterface $origin)
Sets the form that caused this error.
This method must only be called once.
at line line 160
FormInterface
getOrigin()
Returns the form that caused this error.
at line line 170
string
serialize()
Serializes this error.
at line line 186
unserialize(string $serialized)
Unserializes a serialized error.