Exemplo n.º 1
0
 public function searchPersonalia($params)
 {
     // $EMP_ID=Yii::$app->user->identity->EMP_ID;
     $profile = Yii::$app->getUserOpt->Profile_user();
     $query = ModulEvent::find()->joinWith('modulPesonalia', false)->where(['p0001.USER_ID' => $profile->emp->EMP_ID]);
     // add conditions that should always apply here
     $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;
     }
     // grid filtering conditions
     $query->andFilterWhere(['MODUL_ID' => $this->MODUL_ID]);
     // $query->andFilterWhere(['like', 'title', $this->title])
     //     ->andFilterWhere(['like', 'USER_ID', $this->USER_ID])
     //     ->andFilterWhere(['like', 'CREATE_BY', $this->CREATE_BY])
     //     ->andFilterWhere(['like', 'UPDATE_BY', $this->UPDATE_BY]);
     return $dataProvider;
 }
Exemplo n.º 2
0
 public function actionJsoncalendar($start = NULL, $end = NULL, $_ = NULL)
 {
     //public function actionJsoncalendar(){
     $events = array();
     $eventCalendar = ModulEvent::find()->all();
     //print_r($eventCalendar);
     //die();
     //Demo
     $Event = new \yii2fullcalendar\models\Event();
     //FIELD HARUS [id,start,end,title]
     header('Content-type: application/json');
     echo Json::encode($eventCalendar);
     Yii::$app->end();
 }