@@ 120-126 (lines=7) @@ | ||
117 | $options['serializer_groups'] = $attributes['normalization_context']['groups']; |
|
118 | } |
|
119 | ||
120 | if (isset($attributes['denormalization_context']['groups'])) { |
|
121 | if (isset($options['serializer_groups'])) { |
|
122 | $options['serializer_groups'] += $attributes['denormalization_context']['groups']; |
|
123 | } else { |
|
124 | $options['serializer_groups'] = $attributes['denormalization_context']['groups']; |
|
125 | } |
|
126 | } |
|
127 | ||
128 | return $this->getPropertyMetadata($resourceMetadata, $resourceClass, $io, $visited, $options); |
|
129 | } |
@@ 161-169 (lines=9) @@ | ||
158 | $context['serializer_groups'] = $attributes['normalization_context']['groups']; |
|
159 | } |
|
160 | ||
161 | if (isset($attributes['denormalization_context']['groups'])) { |
|
162 | if (isset($context['serializer_groups'])) { |
|
163 | foreach ($attributes['denormalization_context']['groups'] as $groupName) { |
|
164 | $context['serializer_groups'][] = $groupName; |
|
165 | } |
|
166 | } else { |
|
167 | $context['serializer_groups'] = $attributes['denormalization_context']['groups']; |
|
168 | } |
|
169 | } |
|
170 | ||
171 | return $context; |
|
172 | } |