public function versionHasNoConflictAction(int $contentId, int $versionNo, string $languageCode): Response
    {
        $versionInfo = $this->contentService->loadVersionInfoById($contentId, $versionNo);

        if (!$versionInfo->isDraft()) {
            throw new BadStateException('Version status', 'status is not draft');
        }

        if ((new VersionHasConflict($this->contentService, $languageCode))->isSatisfiedBy($versionInfo)) {
            return new Response('', Response::HTTP_CONFLICT);
        }

        return new Response();
    }
public function versionHasNoConflictAction(int $contentId, int $versionNo, string $languageCode): Response
    {
        $versionInfo = $this->contentService->loadVersionInfoById($contentId, $versionNo);

        if (!$versionInfo->isDraft()) {
            throw new BadStateException('Version status', 'status is not draft');
        }

        if ((new VersionHasConflict($this->contentService, $languageCode))->isSatisfiedBy($versionInfo)) {
            return new Response('', Response::HTTP_CONFLICT);
        }

        return new Response();
    }
public function versionHasNoConflictAction ( int $ contentId , int $ versionNo , string $ languageCode ) : Response { $ versionInfo = $ this -> contentService -> loadVersionInfoById ( $ contentId , $ versionNo ) ; if ( ! $ versionInfo -> isDraft ( ) ) { throw new BadStateException ( 'Version status' , 'status is not draft' ) ; } if ( ( new VersionHasConflict ( $ this -> contentService , $ languageCode ) ) -> isSatisfiedBy ( $ versionInfo ) ) { return new Response ( '' , Response :: HTTP_CONFLICT ) ; } return new Response ( ) ; }
Checks if Version has conflict with another published Version.

If Version has no conflict, return empty Response. If it has conflict return HTML with content of modal.

@param int $contentId
@param int $versionNo
@param string $languageCode

@return Response

@throws \eZ\Publish\API\Repository\Exceptions\NotFoundException
@throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
@throws \eZ\Publish\Core\Base\Exceptions\BadStateException
Checks if Version has conflict with another published Version .