Browse Source

code style and docs

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
12217a3ed8
  1. 4
      extensions/yii/gii/generators/crud/Generator.php
  2. 1
      framework/yii/grid/DataColumn.php

4
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];

1
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;

Loading…
Cancel
Save