Skip to content

Commit

Permalink
Merge pull request #261 from handcode/master
Browse files Browse the repository at this point in the history
make creation of the class name between model and crud generator consistent
  • Loading branch information
schmunk42 committed Nov 5, 2019
2 parents cfde783 + bc61fe9 commit c1c3a3a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/commands/BatchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,14 @@ public function actionCruds()
$this->createDirectoryFromNamespace($this->crudSearchModelNamespace);

foreach ($this->tables as $table) {
$table = str_replace($this->tablePrefix, '', $table);
$name = isset($this->tableNameMap[$table]) ? $this->tableNameMap[$table] :
$this->modelGenerator->generateClassName($table);

if (isset($this->tableNameMap[$table])) {
$tmp_name = $this->tableNameMap[$table];
} else {
$tmp_name = str_replace($this->tablePrefix, '', $table);
}
$name = $this->modelGenerator->generateClassName($tmp_name);

$params = [
'interactive' => $this->interactive,
'overwrite' => $this->overwrite,
Expand Down

0 comments on commit c1c3a3a

Please sign in to comment.