function ConstraintViolationBuilderInterface::setPlural
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
$this
See also
\Symfony\Contracts\Translation\TranslatorInterface::trans()
2 methods override ConstraintViolationBuilderInterface::setPlural()
- ConstraintViolationBuilder::setPlural in core/
lib/ Drupal/ Core/ Validation/ ConstraintViolationBuilder.php - Sets the number which determines how the plural form of the violation message is chosen when it is translated.
- ConstraintViolationBuilder::setPlural in vendor/
symfony/ validator/ Violation/ ConstraintViolationBuilder.php - Sets the number which determines how the plural form of the violation message is chosen when it is translated.
File
-
vendor/
symfony/ validator/ Violation/ ConstraintViolationBuilderInterface.php, line 93
Class
- ConstraintViolationBuilderInterface
- Builds {@link \Symfony\Component\Validator\ConstraintViolationInterface} objects.
Namespace
Symfony\Component\Validator\ViolationCode
public function setPlural(int $number) : static;