Exemplo n.º 1
0
 public function actionIndex()
 {
     $searchModel = new FineSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $model = new Fine();
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'model' => $model, 'module' => $this->module]);
 }
Exemplo n.º 2
0
 public function run()
 {
     $searchModel = new FineSearch();
     $params = Yii::$app->request->queryParams;
     if ($this->staffer && empty($params['FineSearch'])) {
         $params['FineSearch']['staffer_id'] = $this->staffer->id;
     }
     $dataProvider = $searchModel->search($params);
     $model = new Fine();
     return $this->render('add_fine', ['module' => yii::$app->getModule('staffer'), 'model' => $model, 'staffer' => $this->staffer, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }