You are here

public function ConstraintViolationInterface::getMessagePluralization in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/ConstraintViolationInterface.php \Symfony\Component\Validator\ConstraintViolationInterface::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

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

Deprecated

since version 2.7, to be replaced by getPlural() in 3.0.

1 method overrides ConstraintViolationInterface::getMessagePluralization()
ConstraintViolation::getMessagePluralization in vendor/symfony/validator/ConstraintViolation.php

File

vendor/symfony/validator/ConstraintViolationInterface.php, line 86

Class

ConstraintViolationInterface
A violation of a constraint that happened during validation.

Namespace

Symfony\Component\Validator

Code

public function getMessagePluralization();