Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Contenidos::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['fecha_entrevista' => SORT_DESC]]]);
     $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(['contenido_id' => $this->contenido_id, 'seccion_id' => $this->seccion_id, 'fecha_entrevista' => $this->fecha_entrevista, 'fecha_programacion' => $this->fecha_programacion, 'link_youtube' => $this->link_youtube, 'profesion_id' => $this->profesion_id, 'generado_por_id' => $this->generado_por_id, 'entrevistador_id' => $this->entrevistador_id, 'reconocimiento' => $this->reconocimiento]);
     $query->andFilterWhere(['like', 'no_pauta', $this->no_pauta])->andFilterWhere(['like', 'nombre_talento', $this->nombre_talento])->andFilterWhere(['like', 'redes_sociales_talento', $this->redes_sociales_talento])->andFilterWhere(['like', 'cv_biografia', $this->cv_biografia])->andFilterWhere(['like', 'telefono_oficina', $this->telefono_oficina])->andFilterWhere(['like', 'celular', $this->celular])->andFilterWhere(['like', 'mail', $this->mail])->andFilterWhere(['like', 'direccion_oficina', $this->direccion_oficina]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContenidos()
 {
     return $this->hasMany(Contenidos::className(), ['entrevistador_id' => 'entrevistador_id']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContenidos()
 {
     return $this->hasMany(Contenidos::className(), ['profesion_id' => 'profesion_id']);
 }
Ejemplo n.º 4
0
 /**
  * Finds the Contenidos model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Contenidos the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Contenidos::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getContenidos()
 {
     return $this->hasMany(Contenidos::className(), ['generado_por_id' => 'generado_por_id']);
 }