Commit c92c0089 authored by Carsten Brandt's avatar Carsten Brandt

Removed part about extending attributes which is not basic usage

Discussion is here:
https://github.com/yiisoft/yii2/commit/9bc5868dd1f1d843c133d73726fd3f01197a3d5d#commitcomment-3552713
parent 3aed0825
...@@ -50,20 +50,8 @@ class LoginForm extends \yii\base\Model ...@@ -50,20 +50,8 @@ class LoginForm extends \yii\base\Model
} }
``` ```
In order to change this, you can override `attributes()` method that returns a list of model attributes. For example, In order to change this, you can override `attributes()` method that returns a list of model attribute names.
[[\yii\db\ActiveRecord]] class implements attributes as DB table columns:
```php
// Post is associated with the tbl_post DB table.
// Its attributes correspond to the columns in tbl_post
class Post extends \yii\db\ActiveRecord
{
public function table()
{
return 'tbl_post';
}
}
```
Attribute labels Attribute labels
---------------- ----------------
......
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