Commit 9b1ab7cd by Alexander Makarov

Fixes #4708

parent 45e4d47d
...@@ -146,12 +146,15 @@ abstract class ActiveRecord extends BaseActiveRecord ...@@ -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()
......
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