Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Abonnement::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'prijs' => $this->prijs, 'periodeduur' => $this->periodeduur, 'restrictions' => $this->restrictions]);
     $query->andFilterWhere(['like', 'description', $this->description])->andFilterWhere(['like', 'name', $this->name]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
    echo $form->field($company, 'adress');
    ?>
        <?php 
    echo $form->field($company, 'zip');
    ?>
        <?php 
    echo $form->field($company, 'city');
    ?>
 
        <?php 
    echo $form->field($company, 'telephone');
    ?>
        
        <?php 
    if (!$abonnementstypeMdl) {
        echo $form->field($userabonnement, 'abonnement_id')->dropDownList(ArrayHelper::map(Abonnement::find()->all(), 'id', 'name'));
    }
    ?>
        
        <div class="form-group">
            <div class="col-lg-offset-2 col-lg-10">
                <?php 
    echo Html::submitButton(Yii::t('user', 'Register'), ['class' => 'btn btn-primary']);
    ?>

                <?php 
    echo Html::a(Yii::t('user', 'Login'), ["/user/login"]);
    ?>
            </div>
        </div>