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