You are here

public function JsonApiDocumentTopLevelNormalizer::__construct in JSON:API 8

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

Constructs a JsonApiDocumentTopLevelNormalizer object.

Parameters

\Drupal\jsonapi\LinkManager\LinkManager $link_manager: The link manager to get the links.

\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(LinkManager $link_manager, EntityTypeManagerInterface $entity_type_manager, ResourceTypeRepositoryInterface $resource_type_repository) {
  $this->linkManager = $link_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->resourceTypeRepository = $resource_type_repository;
}