@@ -310,11 +310,17 @@ discard block |
||
| 310 | 310 | return $this->getService()->findAssociationPaginated($entity, $property, $page, $perPage); |
| 311 | 311 | } |
| 312 | 312 | |
| 313 | + /** |
|
| 314 | + * @return string |
|
| 315 | + */ |
|
| 313 | 316 | protected function getEntityClass() |
| 314 | 317 | { |
| 315 | 318 | return $this->getCurrentRequest()->attributes->get('_entityClass'); |
| 316 | 319 | } |
| 317 | 320 | |
| 321 | + /** |
|
| 322 | + * @param string $subresource |
|
| 323 | + */ |
|
| 318 | 324 | protected function getSubResourceEntityClass($subresource) |
| 319 | 325 | { |
| 320 | 326 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -323,6 +329,9 @@ discard block |
||
| 323 | 329 | return $propertyMetadata->getType(); |
| 324 | 330 | } |
| 325 | 331 | |
| 332 | + /** |
|
| 333 | + * @return string |
|
| 334 | + */ |
|
| 326 | 335 | protected function getServiceId() |
| 327 | 336 | { |
| 328 | 337 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -369,6 +378,9 @@ discard block |
||
| 369 | 378 | return $classMetaData; |
| 370 | 379 | } |
| 371 | 380 | |
| 381 | + /** |
|
| 382 | + * @param string $propertyPath |
|
| 383 | + */ |
|
| 372 | 384 | protected function resolveSubject($entity, $propertyPath) |
| 373 | 385 | { |
| 374 | 386 | if ('this' === $propertyPath) { |
@@ -423,6 +435,9 @@ discard block |
||
| 423 | 435 | return array_merge($defaultIncludes, $includes); |
| 424 | 436 | } |
| 425 | 437 | |
| 438 | + /** |
|
| 439 | + * @param string[] $attributes |
|
| 440 | + */ |
|
| 426 | 441 | protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') |
| 427 | 442 | { |
| 428 | 443 | if (!$this->getAuthorizationChecker()->isGranted($attributes, $object)) { |