class DataDefinitionEntityReferenceNormalizer in JSON:API Schema 8
Data definition normalizer.
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer
- class \Drupal\jsonapi_schema\Normalizer\DataDefinitionEntityReferenceNormalizer
- class \Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer
Expanded class hierarchy of DataDefinitionEntityReferenceNormalizer
1 string reference to 'DataDefinitionEntityReferenceNormalizer'
1 service uses DataDefinitionEntityReferenceNormalizer
File
- src/
Normalizer/ DataDefinitionEntityReferenceNormalizer.php, line 10
Namespace
Drupal\jsonapi_schema\NormalizerView source
class DataDefinitionEntityReferenceNormalizer extends DataDefinitionNormalizer {
/**
* {@inheritdoc}
*/
protected $supportedDataTypes = [
'entity_reference',
];
/**
* {@inheritdoc}
*/
protected function extractPropertyData(DataDefinitionInterface $property, array $context = []) {
$value = parent::extractPropertyData($property);
$value['type'] = 'object';
return $value;
}
}