Ejemplo n.º 1
0
 private function deletePsychologistDirections($psychologistId)
 {
     return PsychologistDirections::deleteAll('psychologist_id = ' . $psychologistId);
 }
Ejemplo n.º 2
0
 /**
  * Deletes an existing Directions model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $this->findModel($id)->delete();
     PsychologistDirections::deleteAll(['direction_id' => $id]);
     return $this->redirect(['index']);
 }