function FieldResolver::__construct

Same name and namespace in other branches
  1. 10 core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::__construct()
  2. 11.x core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::__construct()
  3. 9 core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::__construct()
  4. 8.9.x core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::__construct()

Creates a FieldResolver instance.

Parameters

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

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

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

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

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

\Drupal\Core\Session\AccountInterface $currentUser: The current user account.

File

core/modules/jsonapi/src/Context/FieldResolver.php, line 89

Class

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

Namespace

Drupal\jsonapi\Context

Code

public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected EntityFieldManagerInterface $fieldManager, protected EntityTypeBundleInfoInterface $entityTypeBundleInfo, protected ResourceTypeRepositoryInterface $resourceTypeRepository, protected ModuleHandlerInterface $moduleHandler, protected AccountInterface $currentUser) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.