function TextItemSillyNormalizer::constructValue
Same name in other branches
- 9 core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::constructValue()
- 8.9.x core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::constructValue()
- 10 core/modules/serialization/tests/modules/field_normalization_test/src/Normalization/TextItemSillyNormalizer.php \Drupal\field_normalization_test\Normalization\TextItemSillyNormalizer::constructValue()
Overrides FieldableEntityNormalizerTrait::constructValue
File
-
core/
modules/ serialization/ tests/ modules/ field_normalization_test/ src/ Normalization/ TextItemSillyNormalizer.php, line 27
Class
- TextItemSillyNormalizer
- A test TextItem normalizer to test denormalization.
Namespace
Drupal\field_normalization_test\NormalizationCode
protected function constructValue($data, $context) {
$value = parent::constructValue($data, $context);
$value['value'] = str_replace('::silly_suffix', '', $value['value']);
return $value;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.