ConstraintViolationInterface::getPlural()

int|null getPlural()

Returns a number for pluralizing the violation message.

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

  • Please select exactly one entry. (choices=1)
  • Please select two entries. (choices=2)

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
doc_Symfony
2016-10-28 06:11:40
Comments
Leave a Comment

Please login to continue.