class TestExtendedNormalizer
Same name in other branches
- 9 core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TestExtendedNormalizer
- 8.9.x core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TestExtendedNormalizer
- 10 core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TestExtendedNormalizer
Test normalizer with a different supported class.
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, \Drupal\serialization\Normalizer\CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\serialization\Normalizer\ComplexDataNormalizer extends \Drupal\serialization\Normalizer\NormalizerBase
- class \Drupal\Tests\serialization\Unit\Normalizer\TestExtendedNormalizer extends \Drupal\serialization\Normalizer\ComplexDataNormalizer
- class \Drupal\serialization\Normalizer\ComplexDataNormalizer extends \Drupal\serialization\Normalizer\NormalizerBase
Expanded class hierarchy of TestExtendedNormalizer
File
-
core/
modules/ serialization/ tests/ src/ Unit/ Normalizer/ ComplexDataNormalizerTest.php, line 117
Namespace
Drupal\Tests\serialization\Unit\NormalizerView source
class TestExtendedNormalizer extends ComplexDataNormalizer {
/**
* {@inheritdoc}
*/
public function getSupportedTypes(?string $format) : array {
return [
\stdClass::class => TRUE,
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY | constant | Name of key for bubbling cacheability metadata via serialization context. | |||
ComplexDataNormalizer::normalize | public | function | 7 | ||
NormalizerBase::$format | protected | property | List of formats which supports (de-)normalization. | 1 | |
NormalizerBase::addCacheableDependency | protected | function | Adds cacheability if applicable. | ||
NormalizerBase::checkFormat | protected | function | Checks if the provided format is supported by this normalizer. | 1 | |
NormalizerBase::supportsDenormalization | public | function | Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() | 1 | |
NormalizerBase::supportsNormalization | public | function | 1 | ||
TestExtendedNormalizer::getSupportedTypes | public | function | Overrides ComplexDataNormalizer::getSupportedTypes |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.