src/ResourceType/ResourceTypeRepository.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ResourceType/ResourceTypeRepository.php b/src/ResourceType/ResourceTypeRepository.php index 128eb47..53c1e4c 100644 --- a/src/ResourceType/ResourceTypeRepository.php +++ b/src/ResourceType/ResourceTypeRepository.php @@ -105,6 +105,17 @@ class ResourceTypeRepository implements ResourceTypeRepositoryInterface { return $cached ? $cached->data : $resource_types; } + /** + * Creates a ResourceType value object for the given entity type + bundle. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type to create a JSON API resource type for. + * @param string $bundle + * The entity type bundle to create a JSON API resource type for. + * + * @return \Drupal\jsonapi\ResourceType\ResourceType + * A JSON API resource type. + */ protected function createResourceType(EntityTypeInterface $entity_type, $bundle) { $raw_fields = $this->getAllFieldNames($entity_type, $bundle); return new ResourceType(