E
E
EVOSandru62015-08-14 13:40:10
Yii
EVOSandru6, 2015-08-14 13:40:10

Is it possible to merge (merge) the scope of the current class with the scope of the parent class in yii?

Hello,
For example:

class ActiveRecord extends CActiveRecord
{
...
return
        [
            'published'=>
            [
                'condition'=>'exist = ' . self::STATUS_PUBLIC,
            ],
       ];
...
}

And there is a successor class:
class Bids extends ActiveRecord
{
...
// тут  необходимо слить текущую группу scopes с родительской, но не перебить при этом
...
}

In general, it would be cool to get such a model after these manipulations:
$model = Bids::model()->published()->busy()->findAll();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2015-08-14
@EVOSandru6

array_merge(parent::

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question