You are here

public function JsonapiHelper::__construct in Entity Share 8.3

Same name and namespace in other branches
  1. 8 modules/entity_share_client/src/Service/JsonapiHelper.php \Drupal\entity_share_client\Service\JsonapiHelper::__construct()
  2. 8.2 modules/entity_share_client/src/Service/JsonapiHelper.php \Drupal\entity_share_client\Service\JsonapiHelper::__construct()

JsonapiHelper constructor.

Parameters

\Symfony\Component\Serializer\SerializerInterface $serializer: A serializer.

\Drupal\jsonapi\Normalizer\JsonApiDocumentTopLevelNormalizer $jsonapi_document_top_level_normalizer: The JsonApiDocumentTopLevelNormalizer normalizer.

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

File

modules/entity_share_client/src/Service/JsonapiHelper.php, line 45

Class

JsonapiHelper
Provides methods not present in the JSON:API module.

Namespace

Drupal\entity_share_client\Service

Code

public function __construct(SerializerInterface $serializer, JsonApiDocumentTopLevelNormalizer $jsonapi_document_top_level_normalizer, ResourceTypeRepositoryInterface $resource_type_repository) {
  $this->jsonapiDocumentTopLevelNormalizer = $jsonapi_document_top_level_normalizer;
  $this->jsonapiDocumentTopLevelNormalizer
    ->setSerializer($serializer);
  $this->resourceTypeRepository = $resource_type_repository;
}