/** * Remove readings for this element. * * @return bool * * @throws Exception */ protected function beforeDelete() { foreach ($this->readings as $reading) { if (!$reading->delete()) { throw new Exception('Delete reading failed: ' . print_r($reading->getErrors(), true)); } } return parent::beforeDelete(); }
public function beforeDelete() { OphCiExamination_IntraocularPressure_Value::model()->deleteAll("element_id = ?", array($this->id)); return parent::beforeDelete(); }
public function beforeDelete() { OphCiExamination_Et_PostOpComplications::model()->deleteAll('element_id = :element_id', array(':element_id' => $this->id)); return parent::beforeDelete(); }