Commit 2fe64eea by Nobuo Kihara

Merge branch 'master' of github.com:yiisoft/yii2

parents 0bd1d803 ecb113f1
......@@ -71,8 +71,8 @@ public function fields()
// field name is "email", the corresponding attribute name is "email_address"
'email' => 'email_address',
// field name is "name", its value is defined by a PHP callback
'name' => function () {
return $this->first_name . ' ' . $this->last_name;
'name' => function ($model) {
return $model->first_name . ' ' . $model->last_name;
},
];
}
......
......@@ -52,8 +52,8 @@ interface Arrayable
* 'email',
* 'firstName' => 'first_name',
* 'lastName' => 'last_name',
* 'fullName' => function () {
* return $this->first_name . ' ' . $this->last_name;
* 'fullName' => function ($model) {
* return $model->first_name . ' ' . $model->last_name;
* },
* ];
* ```
......
......@@ -841,8 +841,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess, Arrayab
* 'email',
* 'firstName' => 'first_name',
* 'lastName' => 'last_name',
* 'fullName' => function () {
* return $this->first_name . ' ' . $this->last_name;
* 'fullName' => function ($model) {
* return $model->first_name . ' ' . $model->last_name;
* },
* ];
* ```
......
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