|
|
|
@ -115,11 +115,16 @@ class Generator extends \yii\gii\Generator
|
|
|
|
|
*/ |
|
|
|
|
public function autoCompleteData() |
|
|
|
|
{ |
|
|
|
|
$db = $this->getDbConnection(); |
|
|
|
|
if ($db === null) { |
|
|
|
|
return [ |
|
|
|
|
'tableName' => function () { |
|
|
|
|
return $this->getDbConnection()->getSchema()->getTableNames(); |
|
|
|
|
'tableName' => function () use ($db) { |
|
|
|
|
return $db->getSchema()->getTableNames(); |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
} else { |
|
|
|
|
return []; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|