diff --git a/extensions/yii/gii/generators/crud/Generator.php b/extensions/yii/gii/generators/crud/Generator.php index b126c7b..bbd2ab5 100644 --- a/extensions/yii/gii/generators/crud/Generator.php +++ b/extensions/yii/gii/generators/crud/Generator.php @@ -188,9 +188,9 @@ class Generator extends \yii\gii\Generator $tableSchema = $this->getTableSchema(); if ($tableSchema === false || !isset($tableSchema->columns[$attribute])) { if (preg_match('/^(password|pass|passwd|passcode)$/i', $attribute)) { - return "\$form->field(\$model, '$attribute')->passwordInput();"; + return "\$form->field(\$model, '$attribute')->passwordInput()"; } else { - return "\$form->field(\$model, '$attribute');"; + return "\$form->field(\$model, '$attribute')"; } } $column = $tableSchema->columns[$attribute]; diff --git a/framework/yii/grid/DataColumn.php b/framework/yii/grid/DataColumn.php index d51af8f..032c21c 100644 --- a/framework/yii/grid/DataColumn.php +++ b/framework/yii/grid/DataColumn.php @@ -41,6 +41,7 @@ class DataColumn extends Column public $label; /** * @var \Closure an anonymous function that returns the value to be displayed for every data model. + * The signature of this function is `function ($model, $index, $widget)`. * If this is not set, `$model[$attribute]` will be used to obtain the value. */ public $value;