controllers/EmailConfigController.php
public function actionEvents()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        $result = ($post = Yii::$app->request->post('depdrop_parents'))
            ? array_flip(ClassCrawler::getEventNames($post[0]))
            : [];
        $output = [];
        foreach ($result as $id => $name) {
            $output[] = compact('id', 'name');
        }
        echo Json::encode(['output' => $output, 'selected' => '']);
    }
public function actionEvents()
    {
        Yii::$app->response->format = Response::FORMAT_JSON;
        $result = ($post = Yii::$app->request->post('depdrop_parents'))
            ? array_flip(ClassCrawler::getEventNames($post[0]))
            : [];
        $output = [];
        foreach ($result as $id => $name) {
            $output[] = compact('id', 'name');
        }
        echo Json::encode(['output' => $output, 'selected' => '']);
    }
public function actionEvents ( ) { Yii :: $ app -> response -> format = Response :: FORMAT_JSON ; $ result = ( $ post = Yii :: $ app -> request -> post ( 'depdrop_parents' ) ) ? array_flip ( ClassCrawler :: getEventNames ( $ post [ 0 ] ) ) : [ ] ; $ output = [ ] ; foreach ( $ result as $ id => $ name ) { $ output [ ] = compact ( 'id' , 'name' ) ; } echo Json :: encode ( [ 'output' => $ output , 'selected' => '' ] ) ; }
Returns json event list for form DepDrop widget.
Returns json event list for form DepDrop widget .