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