code: public function actionTriggerEvents()
      {
          Yii::$app->response->format = Response::FORMAT_JSON;
          $result = ($post = Yii::$app->request->post('depdrop_parents'))
              ? Item::eventList($post[0])
              : [];
          $output = [];
          foreach ($result as $id => $name) {
              $output[] = compact('id', 'name');
          }
          echo Json::encode(['output' => $output, 'selected' => '']);
      }
docs: Returns json event list for form DepDrop widget.