/** * @inheritdoc * @return ActiveQuery|UserWithAttach */ public static function find() { $query = parent::find(); $query->attachBehavior('MagicScopesBehavior', MagicScopesBehavior::className()); return $query; }
/** * @inheritdoc */ public function behaviors() { return [['class' => \phpshko\magicscopes\MagicScopesBehavior::className()]]; }