eZ\Publish\Core\REST\Server\Controller\ContentType::deleteContentTypeGroup PHP Méthode

deleteContentTypeGroup() public méthode

The given content type group is deleted.
public deleteContentTypeGroup ( mixed $contentTypeGroupId ) : eZ\Publish\Core\REST\Server\Values\NoContent
$contentTypeGroupId mixed
Résultat eZ\Publish\Core\REST\Server\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();
    }