function StringNormalizer::denormalize
Same name in other branches
- 8.9.x core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/Normalizer/StringNormalizer.php \Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::denormalize()
- 10 core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/Normalizer/StringNormalizer.php \Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::denormalize()
- 11.x core/modules/jsonapi/tests/modules/jsonapi_test_data_type/src/Normalizer/StringNormalizer.php \Drupal\jsonapi_test_data_type\Normalizer\StringNormalizer::denormalize()
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_test_data_type/ src/ Normalizer/ StringNormalizer.php, line 29
Class
- StringNormalizer
- Normalizes string data weirdly: replaces 'super' with 'NOT' and vice versa.
Namespace
Drupal\jsonapi_test_data_type\NormalizerCode
public function denormalize($data, $class, $format = NULL, array $context = []) {
return str_replace('NOT', 'super', $data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.