You are here

protected function StringTranslationTrait::formatPlural in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php \Drupal\Core\StringTranslation\StringTranslationTrait::formatPlural()
  2. 10 core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php \Drupal\Core\StringTranslation\StringTranslationTrait::formatPlural()

Formats a string containing a count of items.

See also

\Drupal\Core\StringTranslation\TranslationInterface::formatPlural()

61 calls to StringTranslationTrait::formatPlural()
AddFormBase::buildForm in core/modules/media_library/src/Form/AddFormBase.php
Form constructor.
AggregatorController::adminOverview in core/modules/aggregator/src/Controller/AggregatorController.php
Displays the aggregator administration page.
BlockContentDeleteForm::getDescription in core/modules/block_content/src/Form/BlockContentDeleteForm.php
Returns additional text to display as a description.
BlockContentTypeDeleteForm::buildForm in core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php
Form constructor.
BulkForm::viewsFormSubmit in core/modules/views/src/Plugin/views/field/BulkForm.php
Submit handler for the bulk form.

... See full list

File

core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php, line 79

Class

StringTranslationTrait
Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.

Namespace

Drupal\Core\StringTranslation

Code

protected function formatPlural($count, $singular, $plural, array $args = [], array $options = []) {
  return new PluralTranslatableMarkup($count, $singular, $plural, $args, $options, $this
    ->getStringTranslation());
}