コード例 #1
0
function delDocumentType($id)
{
    $tobeDeleted = new DocumentType($id);
    if ($tobeDeleted->isNew()) {
        return true;
    }
    // item never existed in the first place
    if ($tobeDeleted->del()) {
        return true;
    } else {
        return $tobeDeleted;
    }
}