class EntityConditionGroupNormalizer in JSON:API 8
The normalizer used for entity conditions.
@internal
Hierarchy
- class \Drupal\jsonapi\Normalizer\EntityConditionGroupNormalizer implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface
Expanded class hierarchy of EntityConditionGroupNormalizer
1 string reference to 'EntityConditionGroupNormalizer'
1 service uses EntityConditionGroupNormalizer
File
- src/
Normalizer/ EntityConditionGroupNormalizer.php, line 13
Namespace
Drupal\jsonapi\NormalizerView source
class EntityConditionGroupNormalizer implements DenormalizerInterface {
/**
* {@inheritdoc}
*/
protected $supportedInterfaceOrClass = EntityConditionGroup::class;
/**
* {@inheritdoc}
*/
protected $formats = [
'api_json',
];
/**
* {@inheritdoc}
*/
public function supportsDenormalization($data, $type, $format = NULL) {
return $type === $this->supportedInterfaceOrClass;
}
/**
* {@inheritdoc}
*/
public function denormalize($data, $class, $format = NULL, array $context = []) {
return new EntityConditionGroup($data['conjunction'], $data['members']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityConditionGroupNormalizer:: |
protected | property | ||
EntityConditionGroupNormalizer:: |
protected | property | ||
EntityConditionGroupNormalizer:: |
public | function | Denormalizes data back into an object of the given class. | |
EntityConditionGroupNormalizer:: |
public | function | Checks whether the given class is supported for denormalization by this normalizer. |