function StringTranslationTrait::formatPlural
Same name in other branches
- 9 core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php \Drupal\Core\StringTranslation\StringTranslationTrait::formatPlural()
- 8.9.x core/lib/Drupal/Core/StringTranslation/StringTranslationTrait.php \Drupal\Core\StringTranslation\StringTranslationTrait::formatPlural()
- 11.x 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()
55 calls to StringTranslationTrait::formatPlural()
- AddFormBase::buildForm in core/
modules/ media_library/ src/ Form/ AddFormBase.php - Form constructor.
- AddFormBase::updateLibrary in core/
modules/ media_library/ src/ Form/ AddFormBase.php - AJAX callback to send the new media item(s) to the media library.
- 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.
- CKEditor5StylesheetsMessage::getWarning in core/
modules/ ckeditor5/ src/ CKEditor5StylesheetsMessage.php - Generates a warning related to ckeditor_stylesheets.
File
-
core/
lib/ Drupal/ Core/ StringTranslation/ StringTranslationTrait.php, line 79
Class
- StringTranslationTrait
- Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.
Namespace
Drupal\Core\StringTranslationCode
protected function formatPlural($count, $singular, $plural, array $args = [], array $options = []) {
return new PluralTranslatableMarkup($count, $singular, $plural, $args, $options, $this->getStringTranslation());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.