mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-04 20:18:46 +08:00
allow extending only one class to add scopes, fixes #2146 TODO: - [ ] adjust guide docs - [ ] adjust README files of extensions - [ ] finish work and fix test breaks
28 lines
425 B
PHP
28 lines
425 B
PHP
<?php
|
|
|
|
namespace yiiunit\data\ar\mongodb\file;
|
|
|
|
class CustomerFile extends ActiveRecord
|
|
{
|
|
public static function collectionName()
|
|
{
|
|
return 'customer_fs';
|
|
}
|
|
|
|
public function attributes()
|
|
{
|
|
return array_merge(
|
|
parent::attributes(),
|
|
[
|
|
'tag',
|
|
'status',
|
|
]
|
|
);
|
|
}
|
|
|
|
public static function createQuery($config)
|
|
{
|
|
$config['modelClass'] = get_called_class();
|
|
return new CustomerFileQuery($config);
|
|
}
|
|
} |