Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 protected function parent3task()
 {
     $query = Pilotproject::find();
     $ctg = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 200]]);
     return Json::encode($ctg->getModels());
 }
Exemplo n.º 3
0
    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;
        }
    }