Documentation

FormError
in package

Wraps errors in forms.

Tags
author

Bernhard Schussek bschussek@gmail.com

Table of Contents

Properties

$messageParameters  : mixed
$messagePluralization  : mixed
$messageTemplate  : mixed
$cause  : mixed
$message  : string
$origin  : mixed
The form that spawned this error.

Methods

__construct()  : mixed
Any array key in $messageParameters will be used as a placeholder in $messageTemplate.
getCause()  : mixed
Returns the cause of this error.
getMessage()  : string
Returns the error message.
getMessageParameters()  : array<string|int, mixed>
Returns the parameters to be inserted in the message template.
getMessagePluralization()  : int|null
Returns the value for error message pluralization.
getMessageTemplate()  : string
Returns the error message template.
getOrigin()  : FormInterface|null
Returns the form that caused this error.
setOrigin()  : mixed
Sets the form that caused this error.

Properties

$messageParameters

protected mixed $messageParameters

$messagePluralization

protected mixed $messagePluralization

$messageTemplate

protected mixed $messageTemplate

$origin

The form that spawned this error.

private mixed $origin = null

Methods

__construct()

Any array key in $messageParameters will be used as a placeholder in $messageTemplate.

public __construct(string $message[, string|null $messageTemplate = null ][, array<string|int, mixed> $messageParameters = [] ][, int|null $messagePluralization = null ][, mixed $cause = null ]) : mixed
Parameters
$message : string

The translated error message

$messageTemplate : string|null = null

The template for the error message

$messageParameters : array<string|int, mixed> = []

The parameters that should be substituted in the message template

$messagePluralization : int|null = null

The value for error message pluralization

$cause : mixed = null

The cause of the error

Tags
see
Translator

getCause()

Returns the cause of this error.

public getCause() : mixed

getMessage()

Returns the error message.

public getMessage() : string
Return values
string

getMessageParameters()

Returns the parameters to be inserted in the message template.

public getMessageParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMessagePluralization()

Returns the value for error message pluralization.

public getMessagePluralization() : int|null
Return values
int|null

getMessageTemplate()

Returns the error message template.

public getMessageTemplate() : string
Return values
string

        
On this page

Search results