Ejemplo n.º 1
0
 /**
  * Action 
  * Call the method indexAction 
  * @return nothing
  */
 public function indexAction()
 {
     $userTable = new UserTable();
     //$u->create();
     $user = $userTable->findOne('login = ?', array('gs009'));
     $this->render('ControllerIndex:ViewIndex', $user);
 }
Ejemplo n.º 2
0
 /**
  * [indexAction description]
  * @return [type] [description]
  */
 public function indexAction()
 {
     //die(__function__);
     //$this->render('ControllerName:ViewFilename', ['boulou'=>'testou']);
     $u = new UserTable();
     $user = $u->findOne('login = ?', array('nellouille'));
     $this->render('Index:index', $user);
 }
Ejemplo n.º 3
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = UserTable::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(['user_id' => $this->user_id, 'date' => $this->date]);
     $query->andFilterWhere(['like', 'email', $this->email])->andFilterWhere(['like', 'session', $this->session])->andFilterWhere(['like', 'password', $this->password])->andFilterWhere(['like', 'desc', $this->desc]);
     return $dataProvider;
 }
Ejemplo n.º 4
0
 /**
  * Finds the UserTable model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return UserTable the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = UserTable::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }