function ResourceTypeRepositoryInterface::get

Same name in other branches
  1. 9 core/modules/jsonapi/src/ResourceType/ResourceTypeRepositoryInterface.php \Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface::get()
  2. 10 core/modules/jsonapi/src/ResourceType/ResourceTypeRepositoryInterface.php \Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface::get()
  3. 11.x core/modules/jsonapi/src/ResourceType/ResourceTypeRepositoryInterface.php \Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface::get()

Gets a specific JSON:API resource type based on entity type ID and bundle.

Parameters

string $entity_type_id: The entity type ID.

string $bundle: The ID for the bundle to find. If the entity type does not have a bundle, then the entity type ID again.

Return value

\Drupal\jsonapi\ResourceType\ResourceType The requested JSON:API resource type, if it exists. NULL otherwise.

See also

\Drupal\Core\Entity\EntityInterface::bundle()

1 method overrides ResourceTypeRepositoryInterface::get()
ResourceTypeRepository::get in core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php
Gets a specific JSON:API resource type based on entity type ID and bundle.

File

core/modules/jsonapi/src/ResourceType/ResourceTypeRepositoryInterface.php, line 38

Class

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

Namespace

Drupal\jsonapi\ResourceType

Code

public function get($entity_type_id, $bundle);

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