function EntityTypeInterface::getCountLabel
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::getCountLabel()
- 8.9.x core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::getCountLabel()
- 10 core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::getCountLabel()
Gets the label's definite article form for use with a count of entities.
This label should be used when the quantity of entities is provided. The name should be returned in a form usable with a count of the entities. For example: "1 opportunity", "5 opportunities", "1 child", "6 children", "1 content item", "25 content items".
Parameters
int $count: The item count to display if the plural form was requested.
Return value
string|\Drupal\Core\StringTranslation\TranslatableMarkup The count label.
1 method overrides EntityTypeInterface::getCountLabel()
- EntityType::getCountLabel in core/
lib/ Drupal/ Core/ Entity/ EntityType.php - Gets the label's definite article form for use with a count of entities.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityTypeInterface.php, line 654
Class
- EntityTypeInterface
- Provides an interface for an entity type and its metadata.
Namespace
Drupal\Core\EntityCode
public function getCountLabel($count);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.