public function CropNormalizer::supportsDenormalization in Replication 8
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
This class doesn't implement DenormalizerInterface, but most of its child classes do. Therefore, this method is implemented at this level to reduce code duplication.
Overrides NormalizerBase::supportsDenormalization
File
- src/
Normalizer/ CropNormalizer.php, line 74
Class
Namespace
Drupal\replication\NormalizerCode
public function supportsDenormalization($data, $type, $format = NULL) {
if (in_array($type, [
'Drupal\\Core\\Entity\\ContentEntityInterface',
'Drupal\\crop\\Entity\\Crop',
], TRUE)) {
if (!empty($data['@type']) && $data['@type'] == 'crop') {
return TRUE;
}
}
return FALSE;
}