trait I18nAwareTrait

I18n aware trait.

Properties

protected I18n $i18n I18n.

Methods

setI18n(I18n $i18n)

{@inheritdoc}

string
translateFieldName(string $field, string $package)

Returns a translated field name.

array
getI18nParameters(string $field, string $package)

Gets the i18n parameters.

getTranslatedErrorMessage(string $field, string $rule, string|null $package = null)

{@inheritdoc}

Details

at line 41
setI18n(I18n $i18n)

{@inheritdoc}

Parameters

I18n $i18n

at line 55
protected string translateFieldName(string $field, string $package)

Returns a translated field name.

Parameters

string $field Field name
string $package Package prefix

Return Value

string

at line 76
protected array getI18nParameters(string $field, string $package)

Gets the i18n parameters.

Parameters

string $field Field name
string $package Package prefix

Return Value

array

at line 102
getTranslatedErrorMessage(string $field, string $rule, string|null $package = null)

{@inheritdoc}

Parameters

string $field
string $rule
string|null $package