function ResourceTypeRepository::__construct

Same name in other branches
  1. 9 core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php \Drupal\jsonapi\ResourceType\ResourceTypeRepository::__construct()
  2. 10 core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php \Drupal\jsonapi\ResourceType\ResourceTypeRepository::__construct()
  3. 11.x core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php \Drupal\jsonapi\ResourceType\ResourceTypeRepository::__construct()

Instantiates a ResourceTypeRepository object.

Parameters

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

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_bundle_info: The entity type bundle info service.

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

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher: The event dispatcher.

File

core/modules/jsonapi/src/ResourceType/ResourceTypeRepository.php, line 107

Class

ResourceTypeRepository
Provides a repository of all JSON:API resource types.

Namespace

Drupal\jsonapi\ResourceType

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_bundle_info, EntityFieldManagerInterface $entity_field_manager, CacheBackendInterface $cache, EventDispatcherInterface $dispatcher) {
    $this->entityTypeManager = $entity_type_manager;
    $this->entityTypeBundleInfo = $entity_bundle_info;
    $this->entityFieldManager = $entity_field_manager;
    $this->cache = $cache;
    $this->eventDispatcher = $dispatcher;
}

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