diff --git a/application/commands/ImportCommand.php b/application/commands/ImportCommand.php index 04f99174fc5..d1258721276 100644 --- a/application/commands/ImportCommand.php +++ b/application/commands/ImportCommand.php @@ -15,15 +15,25 @@ class ImportCommand extends CConsoleCommand { /** + * ImportCommand constructor. + * @param $name + * @param CConsoleCommandRunner $runner * @throws CException - * @throws Exception */ - public function actionIndex($file,$userId=null) + public function __construct($name, CConsoleCommandRunner $runner) { - + parent::__construct($name, $runner); \Yii::import('application.helpers.admin.import_helper', true); \Yii::import('application.helpers.common_helper', true); \Yii::import('application.helpers.expressions.em_manager_helper', true); + } + + + /** + * @throws Exception + */ + public function actionIndex($file,$userId=null) + { if(!$file){ echo 'File name must be defined. Use --file= argument to define file path.'.PHP_EOL;;