Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConstraintViolationBuilderInterface.php

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\Violation

Code

public function setPlural(int $number) : static;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal