mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Fixes #4708
This commit is contained in:
@ -146,12 +146,15 @@ abstract class ActiveRecord extends BaseActiveRecord
|
|||||||
* This method must be overridden by child classes to define available attributes.
|
* This method must be overridden by child classes to define available attributes.
|
||||||
* Note: primary key attribute "_id" should be always present in returned array.
|
* Note: primary key attribute "_id" should be always present in returned array.
|
||||||
* For example:
|
* For example:
|
||||||
* ~~~
|
*
|
||||||
|
* ```php
|
||||||
* public function attributes()
|
* public function attributes()
|
||||||
* {
|
* {
|
||||||
* return ['_id', 'name', 'address', 'status'];
|
* return ['_id', 'name', 'address', 'status'];
|
||||||
* }
|
* }
|
||||||
* ~~~
|
* ```
|
||||||
|
*
|
||||||
|
* @throws \yii\base\InvalidConfigException if not implemented
|
||||||
* @return array list of attribute names.
|
* @return array list of attribute names.
|
||||||
*/
|
*/
|
||||||
public function attributes()
|
public function attributes()
|
||||||
|
|||||||
Reference in New Issue
Block a user