public function search($params)
    {
        /** @var ActiveRecord $owner */
        $owner = $this->owner;
        $query = $owner::find();
        $t = is_array($query->from) ? key($query->from) : $query->from;
        return $query
            ->filterWhere($params)
            ->andWhere(["$t.owner_id" => Yii::$app->user->identity->{$this->attribute}]);
    }
public function search($params)
    {
        /** @var ActiveRecord $owner */
        $owner = $this->owner;
        $query = $owner::find();
        $t = is_array($query->from) ? key($query->from) : $query->from;
        return $query
            ->filterWhere($params)
            ->andWhere(["$t.owner_id" => Yii::$app->user->identity->{$this->attribute}]);
    }
public function search ( $ params ) { /** @var ActiveRecord $owner */ $ owner = $ this -> owner ; $ query = $ owner :: find ( ) ; $ t = is_array ( $ query -> from ) ? key ( $ query -> from ) : $ query -> from ; return $ query -> filterWhere ( $ params ) -> andWhere ( [ "$t.owner_id" => Yii :: $ app -> user -> identity -> { $ this -> attribute } ] ) ; }
Searches models matching current user owner_id
@param $params
@return \yii\db\ActiveQuery
Searches models matching current user owner_id