| @@ 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. |
|
| @@ 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 | array( |
|
| 563 | 'contentId' => $contentId, |
|
| 564 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 565 | ) |
|
| 566 | ) |
|
| 567 | ); |
|
| 568 | } |
|
| 569 | ||
| 570 | /** |
|
| 571 | * Loads the relations of the given version. |
|