Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeLabels()
  2. 9 core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeLabels()

Builds a list of entity type labels suitable for a Form API options list.

Parameters

bool $group: (optional) Whether to group entity types by plugin group (e.g. 'content', 'config'). Defaults to FALSE.

Return value

array An array of entity type labels, keyed by entity type name.

File

core/lib/Drupal/Core/Entity/EntityTypeRepositoryInterface.php, line 20

Class

EntityTypeRepositoryInterface
Provides an interface for helper methods for loading entity types.

Namespace

Drupal\Core\Entity

Code

public function getEntityTypeLabels($group = FALSE);