You are here

public function ConstraintViolationInterface::getMessagePluralization in Plug 7

Returns a number for pluralizing the violation message.

For example, the message template could have different translation based on a parameter "choices":

<ul> <li>Please select exactly one entry. (choices=1)</li> <li>Please select two entries. (choices=2)</li> </ul>

This method returns the value of the parameter for choosing the right pluralization form (in this case "choices").

Return value

int|null The number to use to pluralize of the message.

1 method overrides ConstraintViolationInterface::getMessagePluralization()
ConstraintViolation::getMessagePluralization in lib/Symfony/validator/Symfony/Component/Validator/ConstraintViolation.php
Returns a number for pluralizing the violation message.

File

lib/Symfony/validator/Symfony/Component/Validator/ConstraintViolationInterface.php, line 90

Class

ConstraintViolationInterface
A violation of a constraint that happened during validation.

Namespace

Symfony\Component\Validator

Code

public function getMessagePluralization();