function EntityResource::__construct

Same name in this branch
  1. main core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::__construct()
Same name and namespace in other branches
  1. 10 core/modules/jsonapi/src/Controller/EntityResource.php \Drupal\jsonapi\Controller\EntityResource::__construct()
  2. 11.x core/modules/jsonapi/src/Controller/EntityResource.php \Drupal\jsonapi\Controller\EntityResource::__construct()
  3. 11.x core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::__construct()
  4. 10 core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::__construct()
  5. 9 core/modules/jsonapi/src/Controller/EntityResource.php \Drupal\jsonapi\Controller\EntityResource::__construct()
  6. 9 core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::__construct()
  7. 8.9.x core/modules/jsonapi/src/Controller/EntityResource.php \Drupal\jsonapi\Controller\EntityResource::__construct()
  8. 8.9.x core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::__construct()

File

core/modules/jsonapi/src/Controller/EntityResource.php, line 80

Class

EntityResource
Process all entity requests.

Namespace

Drupal\jsonapi\Controller

Code

public function __construct(protected EntityTypeManagerInterface $entityTypeManager, protected EntityFieldManagerInterface $fieldManager, protected ResourceTypeRepositoryInterface $resourceTypeRepository, protected RendererInterface $renderer, protected EntityRepositoryInterface $entityRepository, protected IncludeResolver $includeResolver, protected EntityAccessChecker $entityAccessChecker, protected FieldResolver $fieldResolver, #[Autowire(service: 'jsonapi.serializer')] protected SerializerInterface $serializer, protected TimeInterface $time, protected AccountInterface $user, protected EventDispatcherInterface $eventDispatcher) {
}

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