/**
  * Lists all ModulEvent models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ModulEventSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 /**
  * Lists all Absensi models.
  * @return mixed
  */
 public function actionIndex()
 {
     //print_r($this->aryModulID());
     //die();
     if (!Yii::$app->user->isGuest) {
         $searchModel = new AbsensiSearch();
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
         $date = new DateTime();
         $thn = strlen($date->format('Y'));
         $bln = strlen($date->format('m'));
         $hri = strlen($date->format('d'));
         $dateRlt = $thn . "-" . $bln . "-" . $hri;
         $searchModel = new AbsenDailySearch([]);
         /*REKAP ABSENSI*/
         //Field Label
         $dataProviderField = $searchModel->dailyFieldTglRange();
         //Value row
         $dataProvider = $searchModel->searchDailyTglRangeUser(Yii::$app->request->queryParams);
         /*EVENT SEARCH*/
         $searchModelEvent = new ModulEventSearch();
         $dataProviderEvent = $searchModelEvent->searchPersonal(Yii::$app->request->queryParams);
         // print_r($searchModelEvent);
         // die();
         /*EVENT MODEL FORM*/
         $modelEvent = new ModulEvent();
         /*Model View Ijin,cuti,Absensi*/
         // $model =  ModulPersonalia::find()->where([ID=>'15'])->one();
         $searchModelpersonalia = new ModulEventSearch();
         $dataProviderpersonali = $searchModelpersonalia->searchPersonalia(Yii::$app->request->queryParams);
         return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'searchModelpersonalia' => $searchModelpersonalia, 'dataProviderpersonali' => $dataProviderpersonali, 'searchModel' => $searchModel, 'dataProviderField' => $dataProviderField, 'dataProvider' => $dataProvider, 'searchModelEvent' => $searchModelEvent, 'dataProviderEvent' => $dataProviderEvent, 'modelEvent' => $modelEvent, 'aryModulID' => $this->aryModulID(), 'model' => $model]);
     } else {
         Yii::$app->user->logout();
     }
 }