Esempio n. 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Send::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(['nos_id' => $this->nos_id, 'henkilo_id' => $this->henkilo_id, 'labra_id' => $this->labra_id, 'lahetyspvm' => $this->lahetyspvm]);
     $query->andFilterWhere(['like', 'lisatietoja', $this->lisatietoja]);
     return $dataProvider;
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Send::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(['sytle_id' => $this->sytle_id]);
     $query->andFilterWhere(['like', 'customer_user_name1', $this->customer_user_name1])->andFilterWhere(['like', 'customer_user_name2', $this->customer_user_name2]);
     return $dataProvider;
 }
Esempio n. 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSends()
 {
     return $this->hasMany(Send::className(), ['labra_id' => 'id']);
 }
Esempio n. 4
0
 /**
  * Finds the Send model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Send the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Send::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSends()
 {
     return $this->hasMany(Send::className(), ['sytle_id' => 'style_id']);
 }