Ejemplo n.º 1
0
 protected function findModelItem($id)
 {
     if (($model = ItemProgramacao::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = ItemProgramacao::find()->where(['evento_idevento' => $params['idevento']]);
     $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(['iditemProgramacao' => $this->iditemProgramacao, 'hora' => $this->hora, 'vagas' => $this->vagas, 'cargaHoraria' => $this->cargaHoraria, 'local_idlocal' => $this->local_idlocal, 'evento_idevento' => $this->evento_idevento, 'tipo_idtipo' => $this->tipo_idtipo]);
     $query->andFilterWhere(['like', 'titulo', $this->titulo])->andFilterWhere(['like', 'descricao', $this->descricao])->andFilterWhere(['like', 'data', $this->data])->andFilterWhere(['like', 'detalhe', $this->detalhe])->andFilterWhere(['like', 'notificacao', $this->notificacao]);
     return $dataProvider;
 }
Ejemplo n.º 3
0
 /**
  * Finds the ItemProgramacao model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return ItemProgramacao the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = ItemProgramacao::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('A página solicitada não existe.');
     }
 }
Ejemplo n.º 4
0
 public function getListaItem($id_evento)
 {
     $model = ItemProgramacao::find()->select(['evento.sigla', 'itemProgramacao.iditemProgramacao', 'itemProgramacao.titulo', 'itemProgramacao.descricao'])->leftJoin("evento", "evento.idevento = itemProgramacao.evento_idevento")->where('evento_idevento = "' . $id_evento . '"')->all();
     return $model;
 }
Ejemplo n.º 5
0
Archivo: Pacote.php Proyecto: schw/SGE3
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getItemProgramacaoIditemProgramacaos()
 {
     return $this->hasMany(ItemProgramacao::className(), ['iditemProgramacao' => 'itemProgramacao_iditemProgramacao'])->viaTable('itemProgramacao_has_pacote', ['pacote_idpacote' => 'idpacote']);
 }
Ejemplo n.º 6
0
Archivo: Evento.php Proyecto: schw/SGE3
 public function getItemProgramacao()
 {
     return $this->hasMany(ItemProgramacao::className(), ['evento_idevento' => 'idevento']);
 }
Ejemplo n.º 7
0
Archivo: Tipo.php Proyecto: schw/SGE3
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getItemProgramacaos()
 {
     return $this->hasMany(ItemProgramacao::className(), ['tipo_idtipo' => 'idtipo']);
 }
Ejemplo n.º 8
0
 public function getItemProgramacao()
 {
     return $this->hasOne(ItemProgramacao::className(), ['iditemProgramacao' => 'itemProgramacao_iditemProgramacao']);
 }
Ejemplo n.º 9
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getItemProgramacao()
 {
     return $this->hasMany(ItemProgramacao::className(), ['palestrante_idPalestrante' => 'idPalestrante']);
 }
Ejemplo n.º 10
0
 public function possuiItemProgramacao()
 {
     $id_evento = Yii::$app->request->post('evento_idevento');
     $results = ItemProgramacao::find()->where(['evento_idevento' => $id_evento])->count();
     return $results;
 }
Ejemplo n.º 11
0
Archivo: Local.php Proyecto: schw/SGE3
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getItemProgramacaos()
 {
     return $this->hasMany(ItemProgramacao::className(), ['local_idlocal' => 'idlocal']);
 }