Element_OphTrOperationnote_Anaesthetic::beforeDelete PHP Method

beforeDelete() protected method

Need to delete associated records.
See also: CActiveRecord::beforeDelete()
protected beforeDelete ( )
    protected function beforeDelete()
    {
        OphTrOperationnote_OperationAnaestheticAgent::model()->deleteAllByAttributes(array('et_ophtroperationnote_anaesthetic_id' => $this->id));
        OphTrOperationnote_AnaestheticComplication::model()->deleteAllByAttributes(array('et_ophtroperationnote_anaesthetic_id' => $this->id));
        return parent::beforeDelete();
    }