| @@ 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. |
|
| @@ 588-601 (lines=14) @@ | ||
| 585 | * |
|
| 586 | * @return \eZ\Publish\Core\REST\Server\Values\TemporaryRedirect |
|
| 587 | */ |
|
| 588 | public function redirectCurrentVersionRelations($contentId) |
|
| 589 | { |
|
| 590 | $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId); |
|
| 591 | ||
| 592 | return new Values\TemporaryRedirect( |
|
| 593 | $this->router->generate( |
|
| 594 | 'ezpublish_rest_redirectCurrentVersionRelations', |
|
| 595 | array( |
|
| 596 | 'contentId' => $contentId, |
|
| 597 | 'versionNumber' => $contentInfo->currentVersionNo, |
|
| 598 | ) |
|
| 599 | ) |
|
| 600 | ); |
|
| 601 | } |
|
| 602 | ||
| 603 | /** |
|
| 604 | * Loads the relations of the given version. |
|