@@ -354,6 +354,9 @@ |
||
| 354 | 354 | return $this; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | + /** |
|
| 358 | + * @param boolean $value |
|
| 359 | + */ |
|
| 357 | 360 | protected function getBool(?bool $value, bool $default) |
| 358 | 361 | { |
| 359 | 362 | if (null === $value) { |
@@ -144,6 +144,10 @@ |
||
| 144 | 144 | return $data; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | + /** |
|
| 148 | + * @param string $currentPath |
|
| 149 | + * @param string[] $includes |
|
| 150 | + */ |
|
| 147 | 151 | private function isIncluded($currentPath, array $paths, ?array $includes): bool |
| 148 | 152 | { |
| 149 | 153 | if (null === $includes) { |
@@ -239,11 +239,17 @@ discard block |
||
| 239 | 239 | return $entity; |
| 240 | 240 | } |
| 241 | 241 | |
| 242 | + /** |
|
| 243 | + * @return string |
|
| 244 | + */ |
|
| 242 | 245 | protected function getEntityClass() |
| 243 | 246 | { |
| 244 | 247 | return $this->getCurrentRequest()->attributes->get('_entityClass'); |
| 245 | 248 | } |
| 246 | 249 | |
| 250 | + /** |
|
| 251 | + * @param string $subresource |
|
| 252 | + */ |
|
| 247 | 253 | protected function getSubResourceEntityClass($subresource) |
| 248 | 254 | { |
| 249 | 255 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -293,6 +299,9 @@ discard block |
||
| 293 | 299 | return $classMetaData; |
| 294 | 300 | } |
| 295 | 301 | |
| 302 | + /** |
|
| 303 | + * @param string $propertyPath |
|
| 304 | + */ |
|
| 296 | 305 | protected function resolveSubject($entity, $propertyPath) |
| 297 | 306 | { |
| 298 | 307 | if ('this' === $propertyPath) { |
@@ -335,6 +344,9 @@ discard block |
||
| 335 | 344 | return array_merge($defaultIncludes, $includes); |
| 336 | 345 | } |
| 337 | 346 | |
| 347 | + /** |
|
| 348 | + * @param string[] $attributes |
|
| 349 | + */ |
|
| 338 | 350 | protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') |
| 339 | 351 | { |
| 340 | 352 | if (!$this->getAuthorizationChecker()->isGranted($attributes, $object)) { |