protected function parent3task() { $request = Yii::$app->request; $userid = $request->get('id_user'); $query = Pilotproject::find()->Where('CREATED_BY=' . $userid); $ctg = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 200]]); return Json::encode($ctg->getModels()); }
protected function parent3task() { $query = Pilotproject::find(); $ctg = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 200]]); return Json::encode($ctg->getModels()); }
protected function parent3task() { //$request = Yii::$app->request; //$userid = $request->get('id_user'); //$deptid = $request->get('id_dept'); $query = Pilotproject::find()->Where($this->gt_opt()); if (count($query) != 0) { /*RECORD TIDAK ADA*/ $ctg = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 200]]); return Json::encode($ctg->getModels()); } else { $taskKosong = '[{ "label": "No Data", "id": "1" }]'; return $taskKosong; } }