public function actionModels()
{
// create models
foreach ($this->tables as $table) {
//var_dump($this->tableNameMap, $table);exit;
$params = ['interactive' => $this->interactive, 'overwrite' => $this->overwrite, 'useTranslatableBehavior' => $this->useTranslatableBehavior, 'useTimestampBehavior' => $this->useTimestampBehavior, 'languageTableName' => $this->languageTableName, 'languageCodeColumn' => $this->languageCodeColumn, 'template' => $this->template, 'ns' => $this->modelNamespace, 'db' => $this->modelDb, 'tableName' => $table, 'tablePrefix' => $this->tablePrefix, 'enableI18N' => $this->enableI18N, 'singularEntities' => $this->singularEntities, 'messageCategory' => $this->modelMessageCategory, 'generateModelClass' => $this->extendedModels, 'baseClassSuffix' => $this->modelBaseClassSuffix, 'modelClass' => isset($this->tableNameMap[$table]) ? $this->tableNameMap[$table] : Inflector::camelize($table), 'baseClass' => $this->modelBaseClass, 'baseTraits' => $this->modelBaseTraits, 'removeDuplicateRelations' => $this->modelRemoveDuplicateRelations, 'tableNameMap' => $this->tableNameMap, 'generateQuery' => $this->modelGenerateQuery, 'queryNs' => $this->modelQueryNamespace, 'queryBaseClass' => $this->modelQueryBaseClass, 'generateLabelsFromComments' => $this->modelGenerateLabelsFromComments, 'generateHintsFromComments' => $this->modelGenerateHintsFromComments];
$route = 'gii/giiant-model';
$app = \Yii::$app;
$temp = new \yii\console\Application($this->appConfig);
$temp->runAction(ltrim($route, '/'), $params);
unset($temp);
\Yii::$app = $app;
\Yii::$app->log->logger->flush(true);
}
}