/** * Lists all User models. * @return mixed */ public function actionList($groupId = 0) { Url::remember('', 'actions-redirect'); /** @var PersonsSearch $searchModel */ $searchModel = Yii::createObject(PersonsSearch::className()); if ($groupId !== 0) { $searchModel->GroupID = $groupId; } $searchModel->Blocked = 0; $searchModel->Deleted = 0; $dataProvider = $searchModel->search(Yii::$app->request->post()); $groups = \common\models\cf\PersonsGroupRecord::find()->where(['Deleted' => 0])->all(); $content = $this->renderPartial('_list', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'groupId' => $groupId]); return $this->render('list', ['content' => $content, 'groups' => $groups, 'groupId' => $groupId]); }
/** * Lists all PersonsRecord models. * @return mixed */ public function actionIndex() { $searchModel = new PersonsSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }