/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Classes::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(['idclasses' => $this->idclasses, 'valor' => $this->valor]);
     $query->andFilterWhere(['like', 'nome', $this->nome]);
     return $dataProvider;
 }
 /**
  * Finds the Classes model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Classes the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Classes::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #3
0
</div>

<div class="row">
  <div class="col-md-6"> 
    <?php 
echo $form->field($model, 'interessado02')->widget(Select2::classname(), ['data' => ArrayHelper::map($interessados, 'id', 'cpf_nome'), 'options' => ['placeholder' => 'Selecione o Interessado ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
  </div>

</div>

<div class="row">
  <div class="col-md-4"> 
    <?php 
echo $form->field($model, 'classes_idclasses')->dropDownList(ArrayHelper::map(\frontend\models\Classes::find()->orderBy(['nome' => SORT_ASC])->all(), 'idclasses', 'nome'), ['prompt' => 'Selecione']);
?>
  </div>
  <div class="col-md-4"> 
    <?php 
echo $form->field($model, 'situacao')->dropdownList(['acordo' => 'Acordo', 'sem_acordo' => 'Sem Acordo', 'reconciliacao' => 'Reconciliação', 'redesignada' => 'Redesignada', 'processo_nao_realizados' => 'Processo Não Realizado'], ['prompt' => 'Selecione']);
?>
    </div>
      <div class="col-md-3">
  <?php 
echo $form->field($model, 'dataFim')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATETIME, 'ajaxConversion' => false, 'value' => time(), 'options' => ['pluginOptions' => ['autoclose' => true]]]);
?>
  </div>
  </div>
    <div class="row">
      <div class="col-md-6"> 
Example #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClassesIdclasses()
 {
     return $this->hasOne(Classes::className(), ['idclasses' => 'classes_idclasses']);
 }