public function deleteContentTypeGroup($contentTypeGroupId)
    {
        $contentTypeGroup = $this->contentTypeService->loadContentTypeGroup($contentTypeGroupId);

        $contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
        if (!empty($contentTypes)) {
            throw new ForbiddenException('Only empty content type groups can be deleted');
        }

        $this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);

        return new Values\NoContent();
    }
public function deleteContentTypeGroup($contentTypeGroupId)
    {
        $contentTypeGroup = $this->contentTypeService->loadContentTypeGroup($contentTypeGroupId);

        $contentTypes = $this->contentTypeService->loadContentTypes($contentTypeGroup);
        if (!empty($contentTypes)) {
            throw new ForbiddenException('Only empty content type groups can be deleted');
        }

        $this->contentTypeService->deleteContentTypeGroup($contentTypeGroup);

        return new Values\NoContent();
    }
public function deleteContentTypeGroup ( $ contentTypeGroupId ) { $ contentTypeGroup = $ this -> contentTypeService -> loadContentTypeGroup ( $ contentTypeGroupId ) ; $ contentTypes = $ this -> contentTypeService -> loadContentTypes ( $ contentTypeGroup ) ; if ( ! empty ( $ contentTypes ) ) { throw new ForbiddenException ( 'Only empty content type groups can be deleted' ) ; } $ this -> contentTypeService -> deleteContentTypeGroup ( $ contentTypeGroup ) ; return new Values \ NoContent ( ) ; }
The given content type group is deleted.

@param mixed $contentTypeGroupId

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

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