function TextItemSillyNormalizer::normalize
Same name in other branches
- 9 core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::normalize()
- 8.9.x core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::normalize()
- 10 core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::normalize()
Overrides ComplexDataNormalizer::normalize
File
-
core/
modules/ serialization/ tests/ modules/ field_normalization_test/ src/ Normalization/ TextItemSillyNormalizer.php, line 18
Class
- TextItemSillyNormalizer
- A test TextItem normalizer to test denormalization.
Namespace
Drupal\field_normalization_test\NormalizationCode
public function normalize($object, $format = NULL, array $context = []) : array|string|int|float|bool|\ArrayObject|null {
$data = parent::normalize($object, $format, $context);
$data['value'] .= '::silly_suffix';
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.