updateVersion() 공개 메소드

A specific draft is updated.
public updateVersion ( mixed $contentId, mixed $versionNumber, Request $request ) : Version
$contentId mixed
$versionNumber mixed
$request Symfony\Component\HttpFoundation\Request
리턴 eZ\Publish\Core\REST\Server\Values\Version
예제 #1
0
 /**
  * If the updated content is a user, update it using the user API, and return a Version object.
  *
  * @param mixed $contentId
  * @param int $versionNumber
  * @param \Symfony\Component\HttpFoundation\Request $request
  *
  * @return \eZ\Publish\Core\REST\Server\Values\Version
  */
 public function updateVersion($contentId, $versionNumber, Request $request)
 {
     if (!$this->isUserContent($contentId)) {
         return parent::updateVersion($contentId, $versionNumber, $request);
     }
     $updatedUser = $this->repository->getUserService()->updateUser($this->repository->getUserService()->loadUser($contentId), $this->mapRequestToUserUpdateStruct($request));
     return $this->mapUserToVersion($updatedUser, $request);
 }