Exemple #1
0
 /**
  * This function is used to return the data to the DepDrop widget
  * See more information on http://demos.krajee.com/widget-details/depdrop
  */
 public function actionGetProjectGroupList()
 {
     $projectGroupList = [];
     $postData = Yii::$app->request->post('depdrop_all_params');
     if (isset($postData['efproject-project_group_id'])) {
         $efProjectType = EfProjectType::find()->where(['PROJECT_GROUP_ID' => $postData['efproject-project_group_id']])->all();
         $projectGroupList = ArrayHelper::toArray($efProjectType, ['app\\models\\EfProjectType' => ['id' => 'PROJECT_TYPE_ID', 'name' => 'PROJECT_TYPE_NAME']]);
     }
     echo Json::encode(['output' => $projectGroupList, 'selected' => '']);
 }