key && 'json' == $format; } public function normalize(GenericDocDTO $genericDocDTO, string $format, array $context = []): array { $storedObject = $this->storedObjectRepository->find($genericDocDTO->identifiers['id']); if (null === $storedObject) { return ['title' => $this->translator->trans('generic_doc.document removed'), 'isPresent' => false]; } return [ 'isPresent' => true, 'title' => $storedObject->getTitle(), 'html' => $this->twig->render( $this->renderer->getTemplate($genericDocDTO, ['show-actions' => false, 'row-only' => true]), $this->renderer->getTemplateData($genericDocDTO, ['show-actions' => false, 'row-only' => true]), ), ]; } }