You are here

public function JsonApiDocumentTopLevelNormalizer::__construct in JSON:API 8.2

Same name and namespace in other branches
  1. 8 src/Normalizer/JsonApiDocumentTopLevelNormalizer.php \Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer::__construct()

Constructs a JsonApiDocumentTopLevelNormalizer object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $resource_type_repository: The JSON:API resource type repository.

File

src/Normalizer/JsonApiDocumentTopLevelNormalizer.php, line 67

Class

JsonApiDocumentTopLevelNormalizer
Normalizes the top-level document according to the JSON:API specification.

Namespace

Drupal\jsonapi\Normalizer

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, ResourceTypeRepositoryInterface $resource_type_repository) {
  $this->entityTypeManager = $entity_type_manager;
  $this->resourceTypeRepository = $resource_type_repository;
}