public function ConstraintViolationBuilderInterface::setPlural in Plug 7
Sets the number which determines how the plural form of the violation message is chosen when it is translated.
Parameters
int $number The number for determining the plural form:
Return value
ConstraintViolationBuilderInterface This builder
See also
\Symfony\Component\Translation\TranslatorInterface::transChoice()
2 methods override ConstraintViolationBuilderInterface::setPlural()
- ConstraintViolationBuilder::setPlural in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ ConstraintViolationBuilder.php - Sets the number which determines how the plural form of the violation message is chosen when it is translated.
- LegacyConstraintViolationBuilder::setPlural in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ LegacyConstraintViolationBuilder.php - Sets the number which determines how the plural form of the violation message is chosen when it is translated.
File
- lib/
Symfony/ validator/ Symfony/ Component/ Validator/ Violation/ ConstraintViolationBuilderInterface.php, line 91
Class
- ConstraintViolationBuilderInterface
- Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.
Namespace
Symfony\Component\Validator\ViolationCode
public function setPlural($number);