manager->buildOneGenericDoc($object->getRelatedGenericDocKey(), $object->getRelatedGenericDocIdentifiers()); return [ 'id' => $object->getId(), 'relatedGenericDocKey' => $object->getRelatedGenericDocKey(), 'relatedGenericDocIdentifiers' => $object->getRelatedGenericDocIdentifiers(), 'createdAt' => $this->normalizer->normalize($object->getCreatedAt(), $format, $context), 'createdBy' => $this->normalizer->normalize($object->getCreatedBy(), $format, $context), 'updatedAt' => $this->normalizer->normalize($object->getUpdatedAt(), $format, $context), 'updatedBy' => $this->normalizer->normalize($object->getUpdatedBy(), $format, $context), 'genericDoc' => $this->normalizer->normalize($genericDoc, $format, [ GenericDocNormalizer::ATTACHED_STORED_OBJECT_PROXY => $object->getProxyStoredObject(), ...$context, ]), ]; } public function supportsNormalization($data, ?string $format = null, array $context = []): bool { return 'json' === $format && $data instanceof EntityWorkflowAttachment; } public function getSupportedTypes(?string $format): array { if ('json' !== $format) { return []; } return [ EntityWorkflowAttachment::class => true, ]; } }