render = $render; } /** * {@inheritDoc} */ public function normalize($socialAction, string $format = null, array $context = []) { return [ 'id' => $socialAction->getId(), 'type' => 'social_work_social_action', 'text' => $this->render->renderString($socialAction, []), 'parent' => $this->normalizer->normalize($socialAction->getParent()), 'desactivationDate' => $this->normalizer->normalize($socialAction->getDesactivationDate()), 'title' => $socialAction->getTitle() ]; } /** * {@inheritDoc} */ public function supportsNormalization($data, string $format = null) { return $data instanceof SocialAction; } }