We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c10ae18 + 77632c6 commit c9dc94bCopy full SHA for c9dc94b
serializer/custom_normalizer.rst
@@ -36,13 +36,13 @@ normalization process::
36
) {
37
}
38
39
- public function normalize($topic, ?string $format = null, array $context = []): array
+ public function normalize(mixed $object, ?string $format = null, array $context = []): array
40
{
41
- $data = $this->normalizer->normalize($topic, $format, $context);
+ $data = $this->normalizer->normalize($object, $format, $context);
42
43
// Here, add, edit, or delete some data:
44
$data['href']['self'] = $this->router->generate('topic_show', [
45
- 'id' => $topic->getId(),
+ 'id' => $object->getId(),
46
], UrlGeneratorInterface::ABSOLUTE_URL);
47
48
return $data;
0 commit comments