Commit 25fa2f2d by Joel Small

Formatting changes to new enum field

parent e6361749
......@@ -247,10 +247,9 @@ class Generator extends \yii\gii\Generator
} else {
$input = 'textInput';
}
if(is_array($column->enumValues) && count($column->enumValues) > 0){
if (is_array($column->enumValues) && count($column->enumValues) > 0) {
$dropDownOptions = "'' => '', ";
foreach ($column->enumValues as $enumValue)
{
foreach ($column->enumValues as $enumValue) {
$dropDownOptions .= "'".$enumValue."' => '".$enumValue."', ";
}
return "\$form->field(\$model, '$attribute')->dropDownList([".$dropDownOptions."])";
......
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