yii\mongodb\ActiveRecord::attributes PHP Method

attributes() public method

This method must be overridden by child classes to define available attributes. Note: primary key attribute "_id" should be always present in returned array. For example: php public function attributes() { return ['_id', 'name', 'address', 'status']; }
public attributes ( ) : array
return array list of attribute names.
    public function attributes()
    {
        throw new InvalidConfigException('The attributes() method of mongodb ActiveRecord has to be implemented by child classes.');
    }