Replaces delete() call with softDelete() so that delete is not permanent. Supports multiple column names to indicate a column should be 'deleted', or, not shown in the application. For instance: visible, deleted; both serve the same purpose but must be set accordingly.
This feature requires that:
- every model extend ActiveRecord instead of CActiveRecord
- controllers which currently use $model->delete() can now use $model->softDelete()
- assumes field names 'active', 'visible', and 'active' are functional equivalents which determine if a value is shown or not (treated as deleted)
Example of controller code: ¶
// existing code //$this->loadModel($id)->delete(); // new code $this->loadModel($id)->softDelete();