protected function _loadFilter($name, $filter, array $options = [])
    {
        if (empty($options['className'])) {
            $class = $filter;
        } else {
            $class = $options['className'];
            unset($options['className']);
        }

        $className = App::className($class, 'Model/Filter');
        if (!$className) {
            throw new InvalidArgumentException(sprintf('Search filter "%s" was not found.', $class));
        }

        return new $className($name, $this->_manager, $options);
    }