You are here

public function RequestHandler::__construct in JSON:API 8

Creates a new RequestHandler instance.

Parameters

\Symfony\Component\Serializer\SerializerInterface $serializer: The JSON API serializer.

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

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

\Drupal\Core\Entity\EntityFieldManagerInterface $field_manager: The entity field manager.

\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type manager.

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

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

File

src/Controller/RequestHandler.php, line 93

Class

RequestHandler
Acts as request forwarder for \Drupal\jsonapi\Controller\EntityResource.

Namespace

Drupal\jsonapi\Controller

Code

public function __construct(SerializerInterface $serializer, ResourceTypeRepositoryInterface $resource_type_repository, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $field_manager, FieldTypePluginManagerInterface $field_type_manager, LinkManager $link_manager, RendererInterface $renderer) {
  $this->serializer = $serializer;
  $this->resourceTypeRepository = $resource_type_repository;
  $this->entityTypeManager = $entity_type_manager;
  $this->fieldManager = $field_manager;
  $this->fieldTypeManager = $field_type_manager;
  $this->linkManager = $link_manager;
  $this->renderer = $renderer;
}