Commit 12217a3e by Carsten Brandt

code style and docs

parent 2c9a8b91
...@@ -188,9 +188,9 @@ class Generator extends \yii\gii\Generator ...@@ -188,9 +188,9 @@ class Generator extends \yii\gii\Generator
$tableSchema = $this->getTableSchema(); $tableSchema = $this->getTableSchema();
if ($tableSchema === false || !isset($tableSchema->columns[$attribute])) { if ($tableSchema === false || !isset($tableSchema->columns[$attribute])) {
if (preg_match('/^(password|pass|passwd|passcode)$/i', $attribute)) { if (preg_match('/^(password|pass|passwd|passcode)$/i', $attribute)) {
return "\$form->field(\$model, '$attribute')->passwordInput();"; return "\$form->field(\$model, '$attribute')->passwordInput()";
} else { } else {
return "\$form->field(\$model, '$attribute');"; return "\$form->field(\$model, '$attribute')";
} }
} }
$column = $tableSchema->columns[$attribute]; $column = $tableSchema->columns[$attribute];
......
...@@ -41,6 +41,7 @@ class DataColumn extends Column ...@@ -41,6 +41,7 @@ class DataColumn extends Column
public $label; public $label;
/** /**
* @var \Closure an anonymous function that returns the value to be displayed for every data model. * @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. * If this is not set, `$model[$attribute]` will be used to obtain the value.
*/ */
public $value; public $value;
......
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