public function actionAdmin() { $model = new ExportModel(); if (isset($_POST['ExportModel'])) { $model->attributes = $_POST['ExportModel']; if ($model->validate()) { $export_key = $model->export_type; if ($export_key != 'cm') { $this->exportDecisions($export_key); } else { $this->exportCommonMarket(); } } } $this->render('export_data', ['model' => $model]); }