| @@ 167-180 (lines=14) @@ | ||
| 164 | * |
|
| 165 | * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect |
|
| 166 | */ |
|
| 167 | public function redirectCurrentVersion($contentId) |
|
| 168 | { |
|
| 169 | $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); |
|
| 170 | ||
| 171 | return new Values\TemporaryRedirect( |
|
| 172 | $this->router->generate( |
|
| 173 | 'ezpublish_rest_loadContentInVersion', |
|
| 174 | [ |
|
| 175 | 'contentId' => $contentId, |
|
| 176 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 177 | ] |
|
| 178 | ) |
|
| 179 | ); |
|
| 180 | } |
|
| 181 | ||
| 182 | /** |
|
| 183 | * Loads a specific version of a given content object. |
|
| @@ 555-568 (lines=14) @@ | ||
| 552 | * |
|
| 553 | * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect |
|
| 554 | */ |
|
| 555 | public function redirectCurrentVersionRelations($contentId) |
|
| 556 | { |
|
| 557 | $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); |
|
| 558 | ||
| 559 | return new Values\TemporaryRedirect( |
|
| 560 | $this->router->generate( |
|
| 561 | 'ezpublish_rest_redirectCurrentVersionRelations', |
|
| 562 | [ |
|
| 563 | 'contentId' => $contentId, |
|
| 564 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 565 | ] |
|
| 566 | ) |
|
| 567 | ); |
|
| 568 | } |
|
| 569 | ||
| 570 | /** |
|
| 571 | * Loads the relations of the given version. |
|