public function actionCruds()
{
// create CRUDs
$providers = ArrayHelper::merge($this->crudProviders, Generator::getCoreProviders());
// create folders
$this->createDirectoryFromNamespace($this->crudControllerNamespace);
$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);
$params = ['interactive' => $this->interactive, 'overwrite' => $this->overwrite, 'template' => $this->template, 'modelClass' => $this->modelNamespace . '\\' . $name, 'searchModelClass' => $this->crudSearchModelNamespace . '\\' . $name . $this->crudSearchModelSuffix, 'controllerNs' => $this->crudControllerNamespace, 'controllerClass' => $this->crudControllerNamespace . '\\' . $name . 'Controller', 'viewPath' => $this->crudViewPath, 'pathPrefix' => $this->crudPathPrefix, 'tablePrefix' => $this->tablePrefix, 'enableI18N' => $this->enableI18N, 'singularEntities' => $this->singularEntities, 'messageCategory' => $this->crudMessageCategory, 'modelMessageCategory' => $this->modelMessageCategory, 'actionButtonClass' => 'yii\\grid\\ActionColumn', 'baseControllerClass' => $this->crudBaseControllerClass, 'providerList' => $providers, 'skipRelations' => $this->crudSkipRelations, 'accessFilter' => $this->crudAccessFilter, 'baseTraits' => $this->crudBaseTraits, 'tidyOutput' => $this->crudTidyOutput, 'fixOutput' => $this->crudFixOutput, 'template' => $this->crudTemplate, 'indexWidgetType' => $this->crudIndexWidgetType, 'indexGridClass' => $this->crudIndexGridClass];
$route = 'gii/giiant-crud';
$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);
}
}