/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = MasterKk::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         $query->where('1=0');
         return $dataProvider;
     }
     $query->andFilterWhere(['master_kk_id' => $this->master_kk_id, 'TGL_LAHIR' => $this->TGL_LAHIR, 'TGL_MASUK' => $this->TGL_MASUK, 'TGL_PENSIUN' => $this->TGL_PENSIUN, 'TGL_CAPEG' => $this->TGL_CAPEG, 'YAKES_AREA' => $this->YAKES_AREA]);
     $query->andFilterWhere(['like', 'NIK', $this->NIK])->andFilterWhere(['like', 'NAMA', $this->NAMA])->andFilterWhere(['like', 'ALAMAT_RUMAH', $this->ALAMAT_RUMAH])->andFilterWhere(['like', 'KOTA_RUMAH', $this->KOTA_RUMAH])->andFilterWhere(['like', 'vESG', $this->vESG])->andFilterWhere(['like', 'BAND_POSISI', $this->BAND_POSISI])->andFilterWhere(['like', 'KLAS_POSISI', $this->KLAS_POSISI])->andFilterWhere(['like', 'cDIVISI', $this->cDIVISI])->andFilterWhere(['like', 'vDIVISI', $this->vDIVISI])->andFilterWhere(['like', 'LOKASI_KERJA', $this->LOKASI_KERJA])->andFilterWhere(['like', 'PERSONALAREA', $this->PERSONALAREA])->andFilterWhere(['like', 'PERSONALSUBAREA', $this->PERSONALSUBAREA])->andFilterWhere(['like', 'PENETAPAN_TPK_BERDASARKAN_TELECONFERENCE', $this->PENETAPAN_TPK_BERDASARKAN_TELECONFERENCE])->andFilterWhere(['like', 'PERSADMIN', $this->PERSADMIN])->andFilterWhere(['like', 'NO_KARTU_KELUARGA', $this->NO_KARTU_KELUARGA])->andFilterWhere(['like', 'NO_KTP', $this->NO_KTP])->andFilterWhere(['like', 'NO_BPJS', $this->NO_BPJS]);
     return $dataProvider;
 }
 /**
  * Finds the MasterKk model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return MasterKk the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = MasterKk::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }