original_string: public static function save_filter_values_from_form(tour $tour, \stdClass $data) {
          $filtername = static::get_filter_name();
  
          $key = "filter_{$filtername}";
  
          $newvalue = $data->$key;
          foreach ($data->$key as $value) {
              if ($value === static::ANYVALUE) {
                  $newvalue = [];
                  break;
              }
          }
  
          $tour->set_filter_values($filtername, $newvalue);
      }
code: public static function save_filter_values_from_form(tour $tour, \stdClass $data) {
          $filtername = static::get_filter_name();
  
          $key = "filter_{$filtername}";
  
          $newvalue = $data->$key;
          foreach ($data->$key as $value) {
              if ($value === static::ANYVALUE) {
                  $newvalue = [];
                  break;
              }
          }
  
          $tour->set_filter_values($filtername, $newvalue);
      }
code_tokens: public static function save_filter_values_from_form ( tour $ tour , \ stdClass $ data ) { $ filtername = static :: get_filter_name ( ) ; $ key = "filter_{$filtername}" ; $ newvalue = $ data -> $ key ; foreach ( $ data -> $ key as $ value ) { if ( $ value === static :: ANYVALUE ) { $ newvalue = [ ] ; break ; } } $ tour -> set_filter_values ( $ filtername , $ newvalue ) ; }
docstring: 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
docstring_tokens: Save the filter values from the form to the tour .