eZ\Publish\Core\REST\Server\Controller\Content::redirectCurrentVersion PHP Method

redirectCurrentVersion() public method

Loads a specific version of a given content object.
public redirectCurrentVersion ( mixed $contentId ) : TemporaryRedirect
$contentId mixed
return eZ\Publish\Core\REST\Server\Values\TemporaryRedirect
    public function redirectCurrentVersion($contentId)
    {
        $contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);
        return new Values\TemporaryRedirect($this->router->generate('ezpublish_rest_loadContentInVersion', array('contentId' => $contentId, 'versionNumber' => $contentInfo->currentVersionNo)));
    }