public function beforeAction($action)
{
$this->appConfig = $this->getYiiConfiguration();
$this->appConfig['id'] = 'temp';
$this->modelGenerator = new ModelGenerator(['db' => $this->modelDb]);
if (!$this->tables) {
$this->modelGenerator->tableName = '*';
$this->tables = $this->modelGenerator->getTableNames();
$tableList = implode("\n\t- ", $this->tables);
$msg = "Are you sure that you want to run action \"{$action->id}\" for the following tables?\n\t- {$tableList}\n\n";
if (!$this->confirm($msg)) {
return false;
}
}
return parent::beforeAction($action);
}