/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = MasterBarang::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['ID' => $this->ID, 'HPP' => $this->HPP, 'HARGA' => $this->HARGA, 'STATUS' => $this->STATUS, 'CREATED_AT' => $this->CREATED_AT, 'UPDATED_AT' => $this->UPDATED_AT]);
     $query->andFilterWhere(['like', 'KD_BARANG', $this->KD_BARANG])->andFilterWhere(['like', 'NM_BARANG', $this->NM_BARANG])->andFilterWhere(['like', 'KD_TYPE', $this->KD_TYPE])->andFilterWhere(['like', 'KD_KATEGORI', $this->KD_KATEGORI])->andFilterWhere(['like', 'KD_UNIT', $this->KD_UNIT])->andFilterWhere(['like', 'KD_SUPPLIER', $this->KD_SUPPLIER])->andFilterWhere(['like', 'KD_DISTRIBUTOR', $this->KD_DISTRIBUTOR])->andFilterWhere(['like', 'PARENT', $this->PARENT])->andFilterWhere(['like', 'BARCODE', $this->BARCODE])->andFilterWhere(['like', 'IMAGE', $this->IMAGE])->andFilterWhere(['like', 'NOTE', $this->NOTE])->andFilterWhere(['like', 'KD_CORP', $this->KD_CORP])->andFilterWhere(['like', 'KD_CAB', $this->KD_CAB])->andFilterWhere(['like', 'KD_DEP', $this->KD_DEP])->andFilterWhere(['like', 'CREATED_BY', $this->CREATED_BY])->andFilterWhere(['like', 'UPDATED_BY', $this->UPDATED_BY])->andFilterWhere(['like', 'DATA_ALL', $this->DATA_ALL])->andFilterWhere(['like', 'CORP_ID', $this->CORP_ID]);
     return $dataProvider;
 }