function SchematicNormalizerTrait::normalize
1 call to SchematicNormalizerTrait::normalize()
- DateTimeIso8601Normalizer::normalize in core/
modules/ serialization/ src/ Normalizer/ DateTimeIso8601Normalizer.php
2 methods override SchematicNormalizerTrait::normalize()
- DateTimeIso8601Normalizer::normalize in core/
modules/ serialization/ src/ Normalizer/ DateTimeIso8601Normalizer.php - EntityReferenceFieldNormalizer::normalize in core/
modules/ jsonapi/ src/ Normalizer/ EntityReferenceFieldNormalizer.php
File
-
core/
modules/ serialization/ src/ Normalizer/ SchematicNormalizerTrait.php, line 27
Class
- SchematicNormalizerTrait
- Trait for normalizers which can also provide JSON Schema.
Namespace
Drupal\serialization\NormalizerCode
public function normalize($object, $format = NULL, array $context = []) : array|string|int|float|bool|\ArrayObject|null {
if ($format === 'json_schema') {
return $this->getNormalizationSchema($object, $context);
}
return $this->doNormalize($object, $format, $context);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.