From c92c0089088ee9c6969a3b6bbe2b1bec866b236e Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 3 Jul 2013 02:14:08 +0200 Subject: [PATCH] Removed part about extending attributes which is not basic usage Discussion is here: https://github.com/yiisoft/yii2/commit/9bc5868dd1f1d843c133d73726fd3f01197a3d5d#commitcomment-3552713 --- docs/guide/model.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/guide/model.md b/docs/guide/model.md index 3da877e..f0da8fa 100644 --- a/docs/guide/model.md +++ b/docs/guide/model.md @@ -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, -[[\yii\db\ActiveRecord]] class implements attributes as DB table columns: +In order to change this, you can override `attributes()` method that returns a list of model attribute names. -```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 ----------------