You are here

public function EdgeEntityType::getCollectionLabel in Apigee Edge 8

Gets the uppercase plural form of the name of the entity type.

This should return a human-readable version of the name that can refer to all the entities of the given type, collectively. An example usage of this is the page title of a page devoted to a collection of entities such as "Workflows" (instead of "Workflow entities").

Return value

string|\Drupal\Core\StringTranslation\TranslatableMarkup The collection label.

Overrides EntityType::getCollectionLabel

File

src/Entity/EdgeEntityType.php, line 99

Class

EdgeEntityType
Provides an implementation of an Apigee Edge entity type and its metadata.

Namespace

Drupal\apigee_edge\Entity

Code

public function getCollectionLabel() {

  // We do not want to display "XY entities" as default collection label
  // rather "XYs".
  $label = $this
    ->getEntityLabelFromConfig('entity_label_plural');
  $label = $label ?: parent::getCollectionLabel();
  return new TranslatableMarkup('@label', [
    '@label' => $label,
  ], [], $this
    ->getStringTranslation());
}