Beispiel #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Kategori::find()->where('STATUS <> 3');
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['CREATED_AT' => $this->CREATED_AT, 'UPDATED_AT' => $this->UPDATED_AT, 'STATUS' => $this->STATUS]);
     $query->andFilterWhere(['like', 'KD_KATEGORI', $this->KD_KATEGORI])->andFilterWhere(['like', 'NM_KATEGORI', $this->NM_KATEGORI])->andFilterWhere(['like', 'NOTE', $this->NOTE]);
     //            ->andFilterWhere(['like', 'CREATED_BY', $this->CREATED_BY])
     //            ->andFilterWhere(['like', 'UPDATED_BY', $this->UPDATED_BY]);
     return $dataProvider;
 }
Beispiel #2
0
 public function getKategori()
 {
     return $this->hasOne(Kategori::className(), ['KD_KATEGORI' => 'KD_KATEGORI']);
 }