@@ -235,6 +235,9 @@ discard block |
||
235 | 235 | return $this->getService()->update($entity); |
236 | 236 | } |
237 | 237 | |
238 | + /** |
|
239 | + * @param string|null $property |
|
240 | + */ |
|
238 | 241 | protected function listSubresource($entity, $property, $page = 1, $perPage = 50): Paginator |
239 | 242 | { |
240 | 243 | $service = $this->getService(); |
@@ -252,6 +255,9 @@ discard block |
||
252 | 255 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
253 | 256 | } |
254 | 257 | |
258 | + /** |
|
259 | + * @return string |
|
260 | + */ |
|
255 | 261 | protected function getServiceId() |
256 | 262 | { |
257 | 263 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -317,6 +323,9 @@ discard block |
||
317 | 323 | $this->assertRightGranted($entity, $right); |
318 | 324 | } |
319 | 325 | |
326 | + /** |
|
327 | + * @param string|null $subresource |
|
328 | + */ |
|
320 | 329 | protected function assertSubresourceListGranted($entity, $subresource) |
321 | 330 | { |
322 | 331 | $classMetadata = $this->getClassMetadata(); |
@@ -330,6 +339,9 @@ discard block |
||
330 | 339 | $this->assertRightGranted($entity, $right); |
331 | 340 | } |
332 | 341 | |
342 | + /** |
|
343 | + * @param string|null $subresource |
|
344 | + */ |
|
333 | 345 | protected function assertSubresourcePostGranted($entity, $subresource) |
334 | 346 | { |
335 | 347 | $classMetadata = $this->getClassMetadata(); |
@@ -355,6 +367,9 @@ discard block |
||
355 | 367 | return $classMetaData; |
356 | 368 | } |
357 | 369 | |
370 | + /** |
|
371 | + * @param string|null $subresource |
|
372 | + */ |
|
358 | 373 | protected function getSubResourceEntityClass($subresource) |
359 | 374 | { |
360 | 375 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -363,6 +378,9 @@ discard block |
||
363 | 378 | return $propertyMetadata->getTargetClass(); |
364 | 379 | } |
365 | 380 | |
381 | + /** |
|
382 | + * @param string $propertyPath |
|
383 | + */ |
|
366 | 384 | protected function resolveSubject($entity, $propertyPath) |
367 | 385 | { |
368 | 386 | if ('this' === $propertyPath) { |