| @@ 165-178 (lines=14) @@ | ||
| 162 | * |
|
| 163 | * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect |
|
| 164 | */ |
|
| 165 | public function redirectCurrentVersion($contentId) |
|
| 166 | { |
|
| 167 | $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); |
|
| 168 | ||
| 169 | return new Values\TemporaryRedirect( |
|
| 170 | $this->router->generate( |
|
| 171 | 'ezpublish_rest_loadContentInVersion', |
|
| 172 | array( |
|
| 173 | 'contentId' => $contentId, |
|
| 174 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 175 | ) |
|
| 176 | ) |
|
| 177 | ); |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * Loads a specific version of a given content object. |
|
| @@ 535-548 (lines=14) @@ | ||
| 532 | * |
|
| 533 | * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect |
|
| 534 | */ |
|
| 535 | public function redirectCurrentVersionRelations($contentId) |
|
| 536 | { |
|
| 537 | $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); |
|
| 538 | ||
| 539 | return new Values\TemporaryRedirect( |
|
| 540 | $this->router->generate( |
|
| 541 | 'ezpublish_rest_redirectCurrentVersionRelations', |
|
| 542 | array( |
|
| 543 | 'contentId' => $contentId, |
|
| 544 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 545 | ) |
|
| 546 | ) |
|
| 547 | ); |
|
| 548 | } |
|
| 549 | ||
| 550 | /** |
|
| 551 | * Loads the relations of the given version. |
|