public function run($query)
    {
        $options = $this->options;
        if ($this->hasActiveFilters()) {
            foreach ($options['params'] as $param => $value) {
                $query->where(
                    function ($query) use ($options, $param, $value) {
                        $options['filters'][$param]($query, $value);
                    }
                );
            }
        }
        //Setting data for filter form
        $this->options['params'] = $options['params'];

        if ($options['save']) {
            $_SESSION[$options['save']] = $options['params'];
        }
        return $query;
    }