security = $security; } public function denormalize($data, string $type, ?string $format = null, array $context = []) { if (null === $data) { return null; } $comment = new PrivateCommentEmbeddable(); $comment->setCommentForUser($this->security->getUser(), $data['privateComment']); } public function supportsDenormalization($data, string $type, ?string $format = null) { return $type === CommentEmbeddable::class; } public function normalize($comment, $format = null, array $contect = []) { return $comment->getComment(); } public function supportsNormalization($data, ?string $format = null) { return $data instanceof CommentEmbeddable; } }