コード例 #1
0
 public function delete($force = false)
 {
     $channel = $this->getChannel();
     $channel->delete($force);
     parent::delete($force);
 }
コード例 #2
0
ファイル: ExampleData.php プロジェクト: itillawarra/cmfive
 public function delete($force = false)
 {
     parent::delete($force);
 }
コード例 #3
0
ファイル: Task.php プロジェクト: itillawarra/cmfive
 /**
  * (non-PHPdoc)
  * @see DbObject::delete()
  */
 function delete($force = false)
 {
     try {
         $this->startTransaction();
         // 1. Call on_before_delete of the TaskGroupType
         $tg = $this->getTaskGroup();
         if (!empty($tg)) {
             $tg_type = $tg->getTaskGroupTypeObject();
             $tg_type->on_before_delete($this);
         }
         // 2. Call on_before_delete of the TaskType
         if ($this->task_type) {
             $this->getTaskTypeObject()->on_before_delete($this);
         }
         // 3. Delete the task
         parent::delete($force);
         // 4. Call on_after_delete of the TaskType
         if ($this->task_type) {
             $this->getTaskTypeObject()->on_after_delete($this);
         }
         // 5. Call on_after_delete of the TaskGroupType
         if (!empty($tg_type)) {
             $tg_type->on_after_delete($this);
         }
         $this->commitTransaction();
     } catch (Exception $ex) {
         $this->Log->error("Deleting Task(" . $this->id . "): " . $ex->getMessage());
         $this->rollbackTransaction();
     }
 }