public function PurchasableEntityTypeRepository::getPurchasableEntityTypeLabels in Commerce Core 8.2
Builds a list of entity type labels suitable for a Form API options list.
Return value
array An array of purchasable entity type labels keyed by entity type ID.
Overrides PurchasableEntityTypeRepositoryInterface::getPurchasableEntityTypeLabels
File
- src/
PurchasableEntityTypeRepository.php, line 39
Class
Namespace
Drupal\commerceCode
public function getPurchasableEntityTypeLabels() {
return array_map(static function (EntityTypeInterface $entity_type) {
return $entity_type
->getLabel();
}, $this
->getPurchasableEntityTypes());
}