Converts the Drupal entity object structure to JSON-LD array structure.
Expanded class hierarchy of JsonldFieldItemNormalizer
class JsonldFieldItemNormalizer extends JsonldNormalizerBase {
/**
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
*/
public function normalize($object, $format = NULL) {
return $object
->getPropertyValues();
}
/**
* Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization()
*/
public function supportsNormalization($data, $format = NULL) {
return parent::supportsNormalization($data, $format) && $data instanceof FieldItemInterface;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JsonldFieldItemNormalizer:: |
public | function |
Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() Overrides NormalizerInterface:: |
|
JsonldFieldItemNormalizer:: |
public | function |
Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization() Overrides JsonldNormalizerBase:: |
|
JsonldNormalizerBase:: |
protected static | property | The formats that this Normalizer supports. | |
SerializerAwareNormalizer:: |
protected | property | ||
SerializerAwareNormalizer:: |
public | function |
Sets the owning Serializer object Overrides SerializerAwareInterface:: |