コード例 #1
0
ファイル: DctProgressLoc.php プロジェクト: Sywooch/babydiary
 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;
 }
コード例 #2
0
 /**
  * Lists all DctProgressLoc models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => DctProgressLoc::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }