Implements \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
Overrides NormalizerInterface::normalize
public function normalize($object, $format = NULL) {
// @todo If an $options parameter is added to the serialize signature, as
// requested in https://github.com/symfony/symfony/pull/4938, then instead
// of creating the array of properties, we could simply call normalize and
// pass in the referenced entity with a flag that ensures it is rendered as
// a node reference and not a node definition.
$entityWrapper = new JsonldEntityWrapper($object->entity, $format, $this->serializer);
return array(
'@id' => $entityWrapper
->getId(),
);
}