You are here

public function EntityNormalizer::__construct in JSON:API 8

Constructs an EntityNormalizer object.

Parameters

\Drupal\jsonapi\LinkManager\LinkManager $link_manager: The link manager.

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

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

File

src/Normalizer/EntityNormalizer.php, line 76

Class

EntityNormalizer
Converts the Drupal entity object to a JSON API array structure.

Namespace

Drupal\jsonapi\Normalizer

Code

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