public static function save_filter_values_from_form(tour $tour, \stdClass $data) {
        $filtername = static::get_filter_name();
        $key = "filter_{$filtername}";
        $newvalue = $data->$key;
        if (empty($data->$key)) {
            $newvalue = [];
        }
        $tour->set_filter_values($filtername, $newvalue);
    }
public static function save_filter_values_from_form(tour $tour, \stdClass $data) {
        $filtername = static::get_filter_name();
        $key = "filter_{$filtername}";
        $newvalue = $data->$key;
        if (empty($data->$key)) {
            $newvalue = [];
        }
        $tour->set_filter_values($filtername, $newvalue);
    }
public static function save_filter_values_from_form ( tour $ tour , \ stdClass $ data ) { $ filtername = static :: get_filter_name ( ) ; $ key = "filter_{$filtername}" ; $ newvalue = $ data -> $ key ; if ( empty ( $ data -> $ key ) ) { $ newvalue = [ ] ; } $ tour -> set_filter_values ( $ filtername , $ newvalue ) ; }
Overrides the base save the filter values from the form to the tour.

@param   tour            $tour       The tour to save values to
@param   stdClass        $data       The data submitted in the form
Overrides the base save the filter values from the form to the tour .