public function deleteContentType($contentTypeId)
    {
        $contentType = $this->contentTypeService->loadContentType($contentTypeId);

        try {
            $this->contentTypeService->deleteContentType($contentType);
        } catch (BadStateException $e) {
            throw new ForbiddenException($e->getMessage());
        }

        return new Values\NoContent();
    }
public function deleteContentType($contentTypeId)
    {
        $contentType = $this->contentTypeService->loadContentType($contentTypeId);

        try {
            $this->contentTypeService->deleteContentType($contentType);
        } catch (BadStateException $e) {
            throw new ForbiddenException($e->getMessage());
        }

        return new Values\NoContent();
    }
public function deleteContentType ( $ contentTypeId ) { $ contentType = $ this -> contentTypeService -> loadContentType ( $ contentTypeId ) ; try { $ this -> contentTypeService -> deleteContentType ( $ contentType ) ; } catch ( BadStateException $ e ) { throw new ForbiddenException ( $ e -> getMessage ( ) ) ; } return new Values \ NoContent ( ) ; }
The given content type is deleted.

@param $contentTypeId

@throws \eZ\Publish\Core\REST\Server\Exceptions\ForbiddenException

@return \eZ\Publish\Core\REST\Server\Values\NoContent
The given content type is deleted .