key && 'json' === $format; } public function normalize(GenericDocDTO $genericDocDTO, string $format, array $context = []): array { if (null === $calendarDoc = $this->calendarDocRepository->find($genericDocDTO->identifiers['id'])) { return ['title' => $this->translator->trans('generic_doc.document removed'), 'isPresent' => false]; } return [ 'isPresent' => true, 'title' => $calendarDoc->getStoredObject()->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]) ), ]; } }