You are here

public function EntityReferenceFieldNormalizer::__construct in JSON:API 8

Instantiates a EntityReferenceFieldNormalizer object.

Parameters

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

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

\Drupal\Core\Field\FieldTypePluginManagerInterface $plugin_manager: The plugin manager for fields.

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

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

File

src/Normalizer/EntityReferenceFieldNormalizer.php, line 73

Class

EntityReferenceFieldNormalizer
Normalizer class specific for entity reference field objects.

Namespace

Drupal\jsonapi\Normalizer

Code

public function __construct(LinkManager $link_manager, EntityFieldManagerInterface $field_manager, FieldTypePluginManagerInterface $plugin_manager, ResourceTypeRepositoryInterface $resource_type_repository, EntityRepositoryInterface $entity_repository) {
  $this->linkManager = $link_manager;
  $this->fieldManager = $field_manager;
  $this->pluginManager = $plugin_manager;
  $this->resourceTypeRepository = $resource_type_repository;
  $this->entityRepository = $entity_repository;
}