You are here

public function ConstraintViolationBuilder::setPlural in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/Violation/ConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::setPlural()
  2. 8 core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder::setPlural()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Violation/ConstraintViolationBuilder.php \Symfony\Component\Validator\Violation\ConstraintViolationBuilder::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

ConstraintViolationBuilderInterface This builder

Overrides ConstraintViolationBuilderInterface::setPlural

See also

\Symfony\Component\Translation\TranslatorInterface::transChoice()

File

vendor/symfony/validator/Violation/ConstraintViolationBuilder.php, line 158

Class

ConstraintViolationBuilder
Default implementation of {@link ConstraintViolationBuilderInterface}.

Namespace

Symfony\Component\Validator\Violation

Code

public function setPlural($number) {
  $this->plural = $number;
  return $this;
}