Commit 8ff55d1a by horizons2

correct typo

useTablePefix => useTablePrefix
parent 1d9e6b6f
...@@ -30,7 +30,7 @@ class Generator extends \yii\gii\Generator ...@@ -30,7 +30,7 @@ class Generator extends \yii\gii\Generator
public $baseClass = 'yii\db\ActiveRecord'; public $baseClass = 'yii\db\ActiveRecord';
public $generateRelations = true; public $generateRelations = true;
public $generateLabelsFromComments = false; public $generateLabelsFromComments = false;
public $useTablePefix=false; public $useTablePrefix=false;
/** /**
* @inheritdoc * @inheritdoc
...@@ -66,7 +66,7 @@ class Generator extends \yii\gii\Generator ...@@ -66,7 +66,7 @@ class Generator extends \yii\gii\Generator
[['baseClass'], 'validateClass', 'params' => ['extends' => ActiveRecord::className()]], [['baseClass'], 'validateClass', 'params' => ['extends' => ActiveRecord::className()]],
[['generateRelations', 'generateLabelsFromComments'], 'boolean'], [['generateRelations', 'generateLabelsFromComments'], 'boolean'],
[['enableI18N'], 'boolean'], [['enableI18N'], 'boolean'],
[['useTablePefix'], 'boolean'], [['useTablePrefix'], 'boolean'],
[['messageCategory'], 'validateMessageCategory', 'skipOnEmpty' => false], [['messageCategory'], 'validateMessageCategory', 'skipOnEmpty' => false],
]); ]);
} }
...@@ -538,11 +538,11 @@ class Generator extends \yii\gii\Generator ...@@ -538,11 +538,11 @@ class Generator extends \yii\gii\Generator
/** /**
* Generates a the tablename with tableprefix usage . * Generates a the tablename with tableprefix usage .
* @param string $tableName the table name (which may contain schema prefix) * @param string $tableName the table name (which may contain schema prefix)
* @return string the generated table name if useTablePefix == true return with {{%}} depending of the position of the prefix * @return string the generated table name if useTablePrefix == true return with {{%}} depending of the position of the prefix
*/ */
public function generateTablename($tableName) public function generateTablename($tableName)
{ {
if (!$this->useTablePefix) { if (!$this->useTablePrefix) {
return $tableName; return $tableName;
} else { } else {
$db = $this->getDbConnection(); $db = $this->getDbConnection();
......
...@@ -10,7 +10,7 @@ echo $form->field($generator, 'modelClass'); ...@@ -10,7 +10,7 @@ echo $form->field($generator, 'modelClass');
echo $form->field($generator, 'ns'); echo $form->field($generator, 'ns');
echo $form->field($generator, 'baseClass'); echo $form->field($generator, 'baseClass');
echo $form->field($generator, 'db'); echo $form->field($generator, 'db');
echo $form->field($generator, 'useTablePefix')->checkbox(); echo $form->field($generator, 'useTablePrefix')->checkbox();
echo $form->field($generator, 'generateRelations')->checkbox(); echo $form->field($generator, 'generateRelations')->checkbox();
echo $form->field($generator, 'generateLabelsFromComments')->checkbox(); echo $form->field($generator, 'generateLabelsFromComments')->checkbox();
echo $form->field($generator, 'enableI18N')->checkbox(); echo $form->field($generator, 'enableI18N')->checkbox();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment