function EntityType::getSingularLabel

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::getSingularLabel()
  2. 10 core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::getSingularLabel()
  3. 11.x core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::getSingularLabel()

Overrides EntityTypeInterface::getSingularLabel

2 calls to EntityType::getSingularLabel()
EntityType::getCountLabel in core/lib/Drupal/Core/Entity/EntityType.php
Gets the label's definite article form for use with a count of entities.
EntityType::getPluralLabel in core/lib/Drupal/Core/Entity/EntityType.php
Gets the indefinite plural form of the name of the entity type.

File

core/lib/Drupal/Core/Entity/EntityType.php, line 798

Class

EntityType
Provides an implementation of an entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function getSingularLabel() {
    if (empty($this->label_singular)) {
        $lowercase_label = mb_strtolower($this->getLabel());
        $this->label_singular = $lowercase_label;
    }
    return $this->label_singular;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.