protected function getQueryFilter($params)
    {
        if (empty($params['FilterClass'])) {
            return null;
        }
        $filterClass = $params['FilterClass'];
        if (!is_subclass_of($filterClass, CMSSiteTreeFilter::class)) {
            throw new InvalidArgumentException("Invalid filter class passed: {$filterClass}");
        }
        return $filterClass::create($params);
    }
protected function getQueryFilter($params)
    {
        if (empty($params['FilterClass'])) {
            return null;
        }
        $filterClass = $params['FilterClass'];
        if (!is_subclass_of($filterClass, CMSSiteTreeFilter::class)) {
            throw new InvalidArgumentException("Invalid filter class passed: {$filterClass}");
        }
        return $filterClass::create($params);
    }
protected function getQueryFilter ( $ params ) { if ( empty ( $ params [ 'FilterClass' ] ) ) { return null ; } $ filterClass = $ params [ 'FilterClass' ] ; if ( ! is_subclass_of ( $ filterClass , CMSSiteTreeFilter :: class ) ) { throw new InvalidArgumentException ( "Invalid filter class passed: {$filterClass}" ) ; } return $ filterClass :: create ( $ params ) ; }
Safely reconstruct a selected filter from a given set of query parameters

@param array $params Query parameters to use, or null if none present
@return CMSSiteTreeFilter The filter class
@throws InvalidArgumentException if invalid filter class is passed.
Safely reconstruct a selected filter from a given set of query parameters