public function actionCreate($args) { if (isset($args[1])) { $this->migrationPath = $this->_getModuleMigrationPath($args[1]); } elseif ($this->module) { $this->migrationPath = $this->_getModuleMigrationPath($this->module); } return parent::actionCreate($args); }
public function actionCreate($args) { // if module is given adjust path if (count($args) == 2) { if (!isset($this->modulePaths[$args[0]])) { echo "\nError: module '{$args[0]}' is not available!\n\n"; return 1; } $this->migrationPath = Yii::getPathOfAlias($this->modulePaths[$args[0]]); $args = array($args[1]); } else { $this->migrationPath = Yii::getPathOfAlias($this->modulePaths[$this->applicationModuleName]); } if (!is_dir($this->migrationPath)) { echo "\nError: '{$this->migrationPath}' does not exist or is not a directory!\n\n"; return 1; } return parent::actionCreate($args); }
public function actionCreate($args) { // if module is given adjust path if (count($args) == 2) { $this->migrationPath = $this->modulePaths[$args[0]]; $args = array($args[1]); } else { $this->migrationPath = $this->modulePaths[$this->applicationModuleName]; } parent::actionCreate($args); }
public function actionCreate($args) { // if module is given adjust path if (count($args) == 2) { if (!isset($this->modulePaths[$args[0]])) { die("\nError: module '{$args[0]}' is not available!\n\n"); } $this->migrationPath = Yii::getPathOfAlias($this->modulePaths[$args[0]]); $args = array($args[1]); } else { $this->migrationPath = Yii::getPathOfAlias($this->modulePaths[$this->applicationModuleName]); } if (!is_dir($this->migrationPath)) { $arr = explode(DS, $this->migrationPath); array_pop($arr); $pre_path = implode(DS, $arr); if (is_dir($pre_path)) { mkdir($this->migrationPath); } else { die("\nError: '{$this->migrationPath}' does not exist or is not a directory!\n\n"); } } parent::actionCreate($args); }
public function actionCreate($args) { // if module is given adjust path if (count($args) == 2) { if (!isset($this->modulePaths[$args[0]])) { echo "\nError: module '{$args[0]}' is not available!\n\n"; return 1; } $this->migrationPath = $this->modulePaths[$args[0]]; $args = array($args[1]); } else { $this->migrationPath = $this->modulePaths[$this->applicationModuleName]; } if (!is_dir($this->migrationPath) && !@mkdir($this->migrationPath)) { echo "\nError: '{$this->migrationPath}' does not exist and could not be created!\n\n"; return 1; } return parent::actionCreate($args); }