public function getLocalizationData($id) { $data = DctVaccinationLoc::find()->with('dctLanguage')->where(['dct_vaccination_id' => $id])->asArray()->all(); $modelLoc = []; foreach ($data as $vaccination) { $modelLoc[$vaccination['dct_language_id']] = ['text' => $vaccination['text'], 'id' => $vaccination['dct_vaccination_id'], 'genitive_text' => $vaccination['genitive_text']]; } return $modelLoc; }
/** * Lists all DctVaccinationLoc models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => DctVaccinationLoc::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }