| Current Path : /var/www/html/chatbot/backend/models/ |
| Current File : /var/www/html/chatbot/backend/models/RosPertubuhanIndukGeneralSearch.php |
<?php
namespace backend\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use backend\models\RosPertubuhanIndukGeneral; //masukkan nama model tanpa .php atau nama class model
/**
* Ubah nama kelas mengikut nama class model
* AdmNegaraSearch represents the model behind the search form of `backend\models\ContentFaq`.
*/
class RosPertubuhanIndukGeneralSearch extends RosPertubuhanIndukGeneral
{
/**
* masukkan nama bidang table db
* @inheritdoc
*/
public function rules()
{
return [
[['id_pt', 'id_penyata','tahun_penyata','kod_status_permohonan','pt_stat','akuan_setuju','akuan_setuju_induk','pem_caw'], 'integer'],
[['no_pertubuhan','created_date','created_by','modified_by','modified_date','no_cawangan','thn_kew_mula','thn_kew_akhir','tarikh_akuan','akuan_papar','tarikh_akuan_papar','tarikh_hantar','tarikh_hantar_induk'], 'safe'],
];
}
/**
* @inheritdoc
*/
public function scenarios()
{
// bypass scenarios() implementation in the parent class
return Model::scenarios();
}
/**
* Ubah atau tambah pada $this-> bidang yang anda hendak masukkan dalam pencarian
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = RosPertubuhanIndukGeneral::find();
// add conditions that should always apply here
$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;
}
// grid filtering conditions
$query->andFilterWhere([
'id_pt' => $this->id_pt,
'id_penyata' => $this->id_penyata,
'no_pertubuhan' => $this->no_pertubuhan,
'no_cawangan' => $this->no_cawangan,
'tahun_penyata' => $this->tahun_penyata,
'thn_kew_mula' => $this->thn_kew_mula,
'thn_kew_akhir' => $this->thn_kew_akhir,
'tarikh_akuan' => $this->tarikh_akuan,
'akuan_papar' => $this->akuan_papar,
'tarikh_akuan_papar' => $this->tarikh_akuan_papar,
'tarikh_hantar' => $this->tarikh_hantar,
'tarikh_hantar_induk' => $this->tarikh_hantar_induk,
'kod_status_permohonan' => $this->kod_status_permohonan,
'pt_stat' => $this->pt_stat,
'akuan_setuju' => $this->akuan_setuju,
'akuan_setuju_induk' => $this->akuan_setuju_induk,
'pem_caw' => $this->pem_caw,
'created_at' => $this->created_date,
'created_by' => $this->created_by,
'updated_at' => $this->modified_date,
'updated_by' => $this->modified_by,
]);
return $dataProvider;
}
}