public function actionTestl()
 {
     echo "sss";
     $dataProvider = new ActiveDataProvider(['query' => Appcomments::find()]);
     //$dataProvider->keys;
     //$dataProvider->models;
     /*$dataProvider->setPagination(false);
     		$mymodel=$dataProvider->models;
     		foreach ($mymodel as $model){
     			echo $model['appid'];
     			
     		}*/
     $pagination = $dataProvider->getPagination();
     var_dump($pagination->page);
     $count = 0;
     while ($categories = $dataProvider->models) {
         /*foreach ($categories as $model) {
         			$model['appid']=0;
         		}*/
         //echo $pagination->page=1+$count;
         $count++;
         $dataProvider->setPagination($count);
     }
     //$mymodel[4]['kind']="bbbbbb";
     //$dataProvider->setModels($mymodel);
     //var_dump($dataProvider->models[4]['kind']);
     //echo $dataProvider->models;
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAppcomments()
 {
     return $this->hasMany(Appcomments::className(), ['appid' => 'id']);
 }