Пример #1
0
 public function getLocalizationData($id)
 {
     $data = DctDoctorLoc::find()->with('dctLanguage')->where(['dct_doctor_id' => $id])->asArray()->all();
     $modelLoc = [];
     foreach ($data as $doctor) {
         $modelLoc[$doctor['dct_language_id']] = ['text' => $doctor['text'], 'id' => $doctor['dct_doctor_loc_id']];
     }
     return $modelLoc;
 }
Пример #2
0
 /**
  * Lists all DctDoctorLoc models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => DctDoctorLoc::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }