예제 #1
0
 public function Search($params)
 {
     $query = Users::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 3]]);
     if ($this->load($params) && $this->validate()) {
         //$query->andFilterWhere(['user_rank' => $this->user_rank]);
         $query->andWhere(['user_rank' => $this->user_rank]);
         return $dataProvider;
     }
     return $dataProvider;
 }
예제 #2
0
 public function GetList($params = [])
 {
     $query = Users::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 8]]);
     return $dataProvider;
 }