You are here

public function FieldResolver::__construct in JSON:API 8.2

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

Creates a FieldResolver instance.

Parameters

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

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The bundle info service.

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

File

src/Context/FieldResolver.php, line 123

Class

FieldResolver
A service that evaluates external path expressions against Drupal fields.

Namespace

Drupal\jsonapi\Context

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $field_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, ResourceTypeRepositoryInterface $resource_type_repository, ModuleHandlerInterface $module_handler) {
  $this->entityTypeManager = $entity_type_manager;
  $this->fieldManager = $field_manager;
  $this->entityTypeBundleInfo = $entity_type_bundle_info;
  $this->resourceTypeRepository = $resource_type_repository;
  $this->moduleHandler = $module_handler;
}