You are here

public function EntityNormalizer::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/serialization/src/Normalizer/EntityNormalizer.php \Drupal\serialization\Normalizer\EntityNormalizer::__construct()
  2. 9 core/modules/serialization/src/Normalizer/EntityNormalizer.php \Drupal\serialization\Normalizer\EntityNormalizer::__construct()

Constructs an EntityNormalizer object.

Parameters

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

\Drupal\Core\Entity\EntityTypeRepositoryInterface $entity_type_repository: The entity type repository.

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

File

core/modules/serialization/src/Normalizer/EntityNormalizer.php, line 34

Class

EntityNormalizer
Normalizes/denormalizes Drupal entity objects into an array structure.

Namespace

Drupal\serialization\Normalizer

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeRepositoryInterface $entity_type_repository, EntityFieldManagerInterface $entity_field_manager) {
  $this->entityTypeManager = $entity_type_manager;
  $this->entityTypeRepository = $entity_type_repository;
  $this->entityFieldManager = $entity_field_manager;
}