public function filter($filter)
    {
        if (is_array($filter)) {
            $filter = new GridFilter($filter);
        }

        if ($filter instanceof FilterSpecification) {
            $filter = new GridFilter($filter->asFilter());
        }

        $this->filter = $filter;

        return $this;
    }
public function filter($filter)
    {
        if (is_array($filter)) {
            $filter = new GridFilter($filter);
        }

        if ($filter instanceof FilterSpecification) {
            $filter = new GridFilter($filter->asFilter());
        }

        $this->filter = $filter;

        return $this;
    }
public function filter ( $ filter ) { if ( is_array ( $ filter ) ) { $ filter = new GridFilter ( $ filter ) ; } if ( $ filter instanceof FilterSpecification ) { $ filter = new GridFilter ( $ filter -> asFilter ( ) ) ; } $ this -> filter = $ filter ; return $ this ; }
Set filter to the resource selecting

@param array|FilterSpecification|GridFilter $filter

@return $this
Set filter to the resource selecting