Delete the event given by $id. Performs the soft delete action if it's been confirmed by $_POST.
public actionDelete ( $id ) | ||
$id |
/** * Ensures that any attached operation booking status is updated after the op note is removed. * * @param $id * * @return bool|void */ public function actionDelete($id) { $proclist = Element_OphTrOperationnote_ProcedureList::model()->find('event_id=?', array($id)); $this->dont_redirect = true; if (parent::actionDelete($id)) { if ($proclist && $proclist->booking_event_id) { if ($api = Yii::app()->moduleAPI->get('OphTrOperationbooking')) { $api->setOperationStatus($proclist->booking_event_id, 'Scheduled or Rescheduled'); } } if (Event::model()->count('episode_id=?', array($this->event->episode_id)) == 0) { $this->redirect(array('/patient/episodes/' . $this->event->episode->patient->id)); } else { $this->redirect(array('/patient/episode/' . $this->event->episode_id)); } } }