public function ConstraintViolation::getMessagePluralization

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

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

Overrides ConstraintViolationInterface::getMessagePluralization

File

drupal/core/vendor/symfony/validator/Symfony/Component/Validator/ConstraintViolation.php, line 132

Class

ConstraintViolation
Default implementation of {@ConstraintViolationInterface}.

Namespace

Symfony\Component\Validator

Code

public function getMessagePluralization() {
  return $this->messagePluralization;
}