public function actionAdmin() { $model = new PfOrderItems('search'); $scopes = $model->scopes(); if (isset($scopes[$this->scope])) { $model->{$this->scope}(); } $model->unsetAttributes(); if (isset($_GET['PfOrderItems'])) { $model->attributes = $_GET['PfOrderItems']; } $this->render('admin', ['model' => $model]); }