public function ConstraintViolation::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.
Overrides ConstraintViolationInterface::getMessagePluralization
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ ConstraintViolation.php, line 161
Class
- ConstraintViolation
- Default implementation of {@ConstraintViolationInterface}.
Namespace
Symfony\Component\ValidatorCode
public function getMessagePluralization() {
return $this->plural;
}