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