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);
    }
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);
    }
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 ) ; }
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
If the updated content is a user update it using the user API and return a Version object .