Пример #1
0
 public function delete()
 {
     if ($this->_mapper->shopTypeDeleteCheck($this)) {
         $this->_mapper->deleteSettings('type', $this->id());
         parent::delete();
     } else {
         throw new Exception("Unable to delete shop type `" . $this->name . "' due shops linked to it.");
     }
 }