public function deleteTranslationFromDraft($contentId, $versionNumber, $languageCode)
    {
        $contentService = $this->repository->getContentService();
        $versionInfo = $contentService->loadVersionInfoById($contentId, $versionNumber);

        if (!$versionInfo->isDraft()) {
            throw new ForbiddenException('Translation can be deleted from DRAFT Version only');
        }

        $contentService->deleteTranslationFromDraft($versionInfo, $languageCode);

        return new Values\NoContent();
    }
public function deleteTranslationFromDraft($contentId, $versionNumber, $languageCode)
    {
        $contentService = $this->repository->getContentService();
        $versionInfo = $contentService->loadVersionInfoById($contentId, $versionNumber);

        if (!$versionInfo->isDraft()) {
            throw new ForbiddenException('Translation can be deleted from DRAFT Version only');
        }

        $contentService->deleteTranslationFromDraft($versionInfo, $languageCode);

        return new Values\NoContent();
    }
public function deleteTranslationFromDraft ( $ contentId , $ versionNumber , $ languageCode ) { $ contentService = $ this -> repository -> getContentService ( ) ; $ versionInfo = $ contentService -> loadVersionInfoById ( $ contentId , $ versionNumber ) ; if ( ! $ versionInfo -> isDraft ( ) ) { throw new ForbiddenException ( 'Translation can be deleted from DRAFT Version only' ) ; } $ contentService -> deleteTranslationFromDraft ( $ versionInfo , $ languageCode ) ; return new Values \ NoContent ( ) ; }
Remove the given Translation from the given Version Draft.

@param int $contentId
@param int $versionNumber
@param string $languageCode

@return \eZ\Publish\Core\REST\Server\Values\NoContent

@throws \eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException
Remove the given Translation from the given Version Draft .