You are here

public function FieldItemNormalizer::__construct in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.3 src/Normalizer/FieldItemNormalizer.php \Drupal\jsonapi_extras\Normalizer\FieldItemNormalizer::__construct()
  2. 8.2 src/Normalizer/FieldItemNormalizer.php \Drupal\jsonapi_extras\Normalizer\FieldItemNormalizer::__construct()

Constructs a new FieldItemNormalizer.

Parameters

\Drupal\jsonapi\Normalizer\FieldItemNormalizer $subject: The JSON API field normalizer entity.

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

\Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerManager $enhancer_manager: The field enhancer manager.

File

src/Normalizer/FieldItemNormalizer.php, line 55

Class

FieldItemNormalizer
Converts the Drupal field structure to a JSON API array structure.

Namespace

Drupal\jsonapi_extras\Normalizer

Code

public function __construct(JsonapiFieldItemNormalizer $subject, EntityTypeManagerInterface $entity_type_manager, ResourceFieldEnhancerManager $enhancer_manager) {
  $this->subject = $subject;
  $this->entityTypeManager = $entity_type_manager;
  $this->enhancerManager = $enhancer_manager;
}