lib/models/DeleteForm.php
public function handle()
    {
        $result = false;
        switch ($this->target) {
            case 'delete_object':
                $result = true;
                if (!is_null($this->relationModel)) {
                    $result = $this->relationModel->suppressAudit()->delete();
                }
                $result = $result && $this->object->delete();
            break;
            case 'archive_object':
                $result = $this->object->archive();
            break;
            case 'unarchive_object':
                $result = $this->object->unarchive();
            break;
            case 'delete_relationship':
                $result = $this->relationModel->delete();
            break;
            case 'end_relationship':
                $result = $this->relationModel->endRelationship();
            break;
        }

        return $result;
    }
public function handle()
    {
        $result = false;
        switch ($this->target) {
            case 'delete_object':
                $result = true;
                if (!is_null($this->relationModel)) {
                    $result = $this->relationModel->suppressAudit()->delete();
                }
                $result = $result && $this->object->delete();
            break;
            case 'archive_object':
                $result = $this->object->archive();
            break;
            case 'unarchive_object':
                $result = $this->object->unarchive();
            break;
            case 'delete_relationship':
                $result = $this->relationModel->delete();
            break;
            case 'end_relationship':
                $result = $this->relationModel->endRelationship();
            break;
        }

        return $result;
    }
[[@doctodo method_description:handle]].

@return [[@doctodo return_type:handle]] [[@doctodo return_description:handle]]