eZ\Publish\Core\Persistence\Legacy\Content\Type\Handler::delete PHP Method

delete() public method

public delete ( mixed $contentTypeId, integer $status ) : boolean
$contentTypeId mixed
$status integer
return boolean
    public function delete($contentTypeId, $status)
    {
        if (Type::STATUS_DEFINED === $status && $this->contentTypeGateway->countInstancesOfType($contentTypeId)) {
            throw new BadStateException('$contentTypeId', "ContentType with given id still has content instances and therefore can't be deleted");
        }
        $this->contentTypeGateway->delete($contentTypeId, $status);
        // @todo FIXME: Return true only if deletion happened
        return true;
    }