class DataDefinitionEmailNormalizer 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\DataDefinitionEmailNormalizer
- class \Drupal\jsonapi_schema\Normalizer\DataDefinitionNormalizer
Expanded class hierarchy of DataDefinitionEmailNormalizer
1 string reference to 'DataDefinitionEmailNormalizer'
1 service uses DataDefinitionEmailNormalizer
File
- src/
Normalizer/ DataDefinitionEmailNormalizer.php, line 10
Namespace
Drupal\jsonapi_schema\NormalizerView source
class DataDefinitionEmailNormalizer extends DataDefinitionNormalizer {
/**
* {@inheritdoc}
*/
protected $supportedDataTypes = [
'email',
];
/**
* {@inheritdoc}
*/
protected function extractPropertyData(DataDefinitionInterface $property, array $context = []) {
$value = parent::extractPropertyData($property);
$value['type'] = 'string';
$value['format'] = 'email';
return $value;
}
}