class DataDefinitionNormalizer in Schemata 8
Same name in this branch
- 8 schemata_json_schema/src/Normalizer/jsonapi/DataDefinitionNormalizer.php \Drupal\schemata_json_schema\Normalizer\jsonapi\DataDefinitionNormalizer
- 8 schemata_json_schema/src/Normalizer/json/DataDefinitionNormalizer.php \Drupal\schemata_json_schema\Normalizer\json\DataDefinitionNormalizer
- 8 schemata_json_schema/src/Normalizer/hal/DataDefinitionNormalizer.php \Drupal\schemata_json_schema\Normalizer\hal\DataDefinitionNormalizer
Normalizer for DataDefinitionInterface instances.
DataDefinitionInterface is the ultimate parent to all data definitions. This service must always be low priority for data definitions, otherwise the simpler normalization process it supports will take precedence over all the complexities most entity properties contain before reaching this level.
DataDefinitionNormalizer produces scalar value definitions.
Unlike the other Normalizer services in the JSON Schema module, this one is used by the hal_schemata normalizer. It is unlikely divergent requirements will develop.
All the TypedData normalizers extend from this class.
Hierarchy
- class \Drupal\serialization\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\SerializerAwareInterface, CacheableNormalizerInterface uses \Symfony\Component\Serializer\SerializerAwareTrait
- class \Drupal\schemata\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface
- class \Drupal\schemata_json_schema\Normalizer\json\JsonNormalizerBase implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface
- class \Drupal\schemata_json_schema\Normalizer\json\DataDefinitionNormalizer
- class \Drupal\schemata_json_schema\Normalizer\jsonapi\DataDefinitionNormalizer
- class \Drupal\schemata_json_schema\Normalizer\json\DataDefinitionNormalizer
- class \Drupal\schemata_json_schema\Normalizer\json\JsonNormalizerBase implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface
- class \Drupal\schemata\Normalizer\NormalizerBase implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface
Expanded class hierarchy of DataDefinitionNormalizer
1 string reference to 'DataDefinitionNormalizer'
- schemata_json_schema.services.yml in schemata_json_schema/
schemata_json_schema.services.yml - schemata_json_schema/schemata_json_schema.services.yml
1 service uses DataDefinitionNormalizer
File
- schemata_json_schema/
src/ Normalizer/ jsonapi/ DataDefinitionNormalizer.php, line 23
Namespace
Drupal\schemata_json_schema\Normalizer\jsonapiView source
class DataDefinitionNormalizer extends JsonDataDefinitionNormalizer {
/**
* The formats that the Normalizer can handle.
*
* @var array
*/
protected $format = 'schema_json';
/**
* The formats that the Normalizer can handle.
*
* @var array
*/
protected $describedFormat = 'api_json';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableNormalizerInterface:: |
constant | Name of key for bubbling cacheability metadata via serialization context. | ||
DataDefinitionNormalizer:: |
protected | property |
The formats that the Normalizer can handle. Overrides JsonNormalizerBase:: |
|
DataDefinitionNormalizer:: |
protected | property |
The formats that the Normalizer can handle. Overrides JsonNormalizerBase:: |
|
DataDefinitionNormalizer:: |
protected | property |
The interface or class that this Normalizer supports. Overrides NormalizerBase:: |
5 |
DataDefinitionNormalizer:: |
protected | function | Extracts property details from a data definition. | |
DataDefinitionNormalizer:: |
public | function | Normalizes an object into a set of arrays/scalars. | 5 |
NormalizerBase:: |
protected | function | Adds cacheability if applicable. | |
NormalizerBase:: |
protected | function |
Checks if the provided format is supported by this normalizer. Overrides NormalizerBase:: |
|
NormalizerBase:: |
public | function | Denormalizes data back into an object of the given class. | |
NormalizerBase:: |
protected | function | Normalize an array of data definitions. | |
NormalizerBase:: |
protected | function | Determine if the given property is a required element of the schema. | |
NormalizerBase:: |
public | function |
Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization() Overrides NormalizerBase:: |
|
NormalizerBase:: |
public | function | Checks whether the given class is supported for normalization by this normalizer. | 1 |