/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = PerfilEvento::find();
     $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(['ID_EVENTO' => $this->ID_EVENTO, 'DATE_EVENT' => $this->DATE_EVENT]);
     $query->andFilterWhere(['like', 'TYPE_EVENT', $this->TYPE_EVENT])->andFilterWhere(['like', 'STATUS_EVENT', $this->STATUS_EVENT])->andFilterWhere(['like', 'NAME_EVENT', $this->NAME_EVENT])->andFilterWhere(['like', 'PLACE_EVENT', $this->PLACE_EVENT]);
     return $dataProvider;
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIDEVENTO()
 {
     return $this->hasOne(PerfilEvento::className(), ['ID_EVENTO' => 'ID_EVENTO']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIDEVENTOs()
 {
     return $this->hasMany(PerfilEvento::className(), ['ID_EVENTO' => 'ID_EVENTO'])->viaTable('participa', ['ID_COL' => 'ID_COL']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPerfilEventos()
 {
     return $this->hasMany(PerfilEvento::className(), ['TYPE_EVENT' => 'TYPE_EVENT']);
 }
 /**
  * Finds the PerfilEvento model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return PerfilEvento the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = PerfilEvento::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIDEVENTOs()
 {
     return $this->hasMany(PerfilEvento::className(), ['ID_EVENTO' => 'ID_EVENTO'])->viaTable('posee', ['ID_CLIENTE' => 'ID_CLIENTE']);
 }