function ConstraintViolationInterface::getPlural
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").
1 method overrides ConstraintViolationInterface::getPlural()
- ConstraintViolation::getPlural in vendor/
symfony/ validator/ ConstraintViolation.php - Returns a number for pluralizing the violation message.
File
-
vendor/
symfony/ validator/ ConstraintViolationInterface.php, line 74
Class
- ConstraintViolationInterface
- A violation of a constraint that happened during validation.
Namespace
Symfony\Component\ValidatorCode
public function getPlural() : ?int;