| @@ 50-52 (lines=3) @@ | ||
| 47 | $data = []; |
|
| 48 | $links = []; |
|
| 49 | ||
| 50 | if (\count($object->getRelations())) { |
|
| 51 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 52 | } |
|
| 53 | ||
| 54 | if (\count($object->getActions())) { |
|
| 55 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| @@ 54-56 (lines=3) @@ | ||
| 51 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 52 | } |
|
| 53 | ||
| 54 | if (\count($object->getActions())) { |
|
| 55 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| 56 | } |
|
| 57 | ||
| 58 | foreach ($object as $resource) { |
|
| 59 | $data[] = $this->normalizer->normalize($resource, $format, $context); |
|
| @@ 56-58 (lines=3) @@ | ||
| 53 | ||
| 54 | $links = []; |
|
| 55 | ||
| 56 | if (count($object->getRelations())) { |
|
| 57 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 58 | } |
|
| 59 | ||
| 60 | if (count($object->getActions())) { |
|
| 61 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| @@ 60-62 (lines=3) @@ | ||
| 57 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 58 | } |
|
| 59 | ||
| 60 | if (count($object->getActions())) { |
|
| 61 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| 62 | } |
|
| 63 | ||
| 64 | if ($nested) { |
|
| 65 | $innerError = new ErrorResource( |
|
| @@ 47-49 (lines=3) @@ | ||
| 44 | { |
|
| 45 | $links = []; |
|
| 46 | ||
| 47 | if (\count($object->getRelations())) { |
|
| 48 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 49 | } |
|
| 50 | ||
| 51 | if (\count($object->getActions())) { |
|
| 52 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| @@ 51-53 (lines=3) @@ | ||
| 48 | $links = \array_merge($links, $this->normalizer->normalize($object->getRelations(), $format, $context)); |
|
| 49 | } |
|
| 50 | ||
| 51 | if (\count($object->getActions())) { |
|
| 52 | $links = \array_merge($links, $this->normalizer->normalize($object->getActions(), $format, $context)); |
|
| 53 | } |
|
| 54 | ||
| 55 | $data = [ |
|
| 56 | 'message' => $object->getMessage(), |
|