| @@ 73-77 (lines=5) @@ | ||
| 70 | continue; |
|
| 71 | } |
|
| 72 | ||
| 73 | if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) { |
|
| 74 | foreach ($collectionOperations as $operationName => $operation) { |
|
| 75 | $annotations[] = $this->getApiDoc(true, $resourceClass, $resourceMetadata, $operationName, $resourceHydraDoc, $entrypointHydraDoc); |
|
| 76 | } |
|
| 77 | } |
|
| 78 | ||
| 79 | if (null !== $itemOperations = $resourceMetadata->getItemOperations()) { |
|
| 80 | foreach ($itemOperations as $operationName => $operation) { |
|
| @@ 88-92 (lines=5) @@ | ||
| 85 | throw new InvalidResourceException(sprintf('Resource %s has no short name defined.', $resourceClass)); |
|
| 86 | } |
|
| 87 | ||
| 88 | if (null !== $collectionOperations = $resourceMetadata->getCollectionOperations()) { |
|
| 89 | foreach ($collectionOperations as $operationName => $operation) { |
|
| 90 | $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationType::COLLECTION); |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| 94 | if (null !== $itemOperations = $resourceMetadata->getItemOperations()) { |
|
| 95 | foreach ($itemOperations as $operationName => $operation) { |
|
| @@ 94-98 (lines=5) @@ | ||
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| 94 | if (null !== $itemOperations = $resourceMetadata->getItemOperations()) { |
|
| 95 | foreach ($itemOperations as $operationName => $operation) { |
|
| 96 | $this->addRoute($routeCollection, $resourceClass, $operationName, $operation, $resourceShortName, OperationType::ITEM); |
|
| 97 | } |
|
| 98 | } |
|
| 99 | ||
| 100 | $this->computeSubresourceOperations($routeCollection, $resourceClass); |
|
| 101 | } |
|