|
@@ 148-151 (lines=4) @@
|
| 145 |
|
*/ |
| 146 |
|
public function delete($ids) { |
| 147 |
|
$instance=$this->getModelInstance($ids); |
| 148 |
|
if (method_exists($instance, "__toString")) |
| 149 |
|
$instanceString=$instance . ""; |
| 150 |
|
else |
| 151 |
|
$instanceString=get_class($instance); |
| 152 |
|
if (sizeof($_POST) > 0) { |
| 153 |
|
try{ |
| 154 |
|
if (DAO::remove($instance)) { |
|
@@ 202-205 (lines=4) @@
|
| 199 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 200 |
|
} |
| 201 |
|
}catch(\Exception $e){ |
| 202 |
|
if (method_exists($instance, "__toString")) |
| 203 |
|
$instanceString=$instance . ""; |
| 204 |
|
else |
| 205 |
|
$instanceString=get_class($instance); |
| 206 |
|
$message=new CRUDMessage("Exception : can not update `" . $instanceString . "`","Exception", "warning", "warning"); |
| 207 |
|
$message=$this->_getEvents()->onErrorUpdateMessage($message); |
| 208 |
|
} |