function ResourceTypeRepository::getAllBundlesForEntityType

Gets all bundle IDs for a given entity type.

Parameters

string $entity_type_id: The entity type for which to get bundles.

Return value

string[] The bundle IDs.

1 call to ResourceTypeRepository::getAllBundlesForEntityType()
ResourceTypeRepository::getRelatableResourceTypesFromFieldDefinition in core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php
Get relatable resource types from a field definition.

File

core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php, line 512

Class

ResourceTypeRepository
Provides a repository of all JSON:API resource types.

Namespace

Drupal\jsonapi\ResourceType

Code

protected function getAllBundlesForEntityType($entity_type_id) {
  return array_keys($this->entityTypeBundleInfo
    ->getBundleInfo($entity_type_id));
}

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