public function DataDefinitionNormalizer::supportsNormalization in JSON:API Schema 8
Overrides NormalizerBase::supportsNormalization
1 call to DataDefinitionNormalizer::supportsNormalization()
- RelationshipFieldDefinitionNormalizer::supportsNormalization in src/
Normalizer/ RelationshipFieldDefinitionNormalizer.php - Checks whether the given class is supported for normalization by this normalizer.
1 method overrides DataDefinitionNormalizer::supportsNormalization()
- RelationshipFieldDefinitionNormalizer::supportsNormalization in src/
Normalizer/ RelationshipFieldDefinitionNormalizer.php - Checks whether the given class is supported for normalization by this normalizer.
File
- src/
Normalizer/ DataDefinitionNormalizer.php, line 170
Class
- DataDefinitionNormalizer
- Normalizer for DataDefinitionInterface instances.
Namespace
Drupal\jsonapi_schema\NormalizerCode
public function supportsNormalization($data, $format = NULL) {
return parent::supportsNormalization($data, $format) && $data instanceof DataDefinitionInterface && (empty($this->supportedDataTypes) || in_array($data
->getDataType(), $this->supportedDataTypes));
}