code: public function setFilterParameters($arrPresets, $arrValues)
      {
          if (!$this->objFilterSettings) {
              throw new \RuntimeException(
                  'Error: no filter object defined, call setFilterSettings() before setFilterParameters().'
              );
          }
  
          $arrPresetNames    = $this->objFilterSettings->getParameters();
          $arrFEFilterParams = array_keys($this->objFilterSettings->getParameterFilterNames());
  
          $arrProcessed = array();
  
          // We have to use all the preset values we want first.
          foreach ($arrPresets as $strPresetName => $arrPreset) {
              if (in_array($strPresetName, $arrPresetNames)) {
                  $arrProcessed[$strPresetName] = $arrPreset['value'];
              }
          }
  
          // Now we have to use all FE filter params, that are either:
          // * not contained within the presets
          // * or are overridable.
          foreach ($arrFEFilterParams as $strParameter) {
              // Unknown parameter? - next please.
              if (!array_key_exists($strParameter, $arrValues)) {
                  continue;
              }
  
              // Not a preset or allowed to override? - use value.
              if ((!array_key_exists($strParameter, $arrPresets)) || $arrPresets[$strParameter]['use_get']) {
                  $arrProcessed[$strParameter] = $arrValues[$strParameter];
              }
          }
  
          $this->arrParam = $arrProcessed;
  
          return $this;
      }
docs: Set parameters.
  
  @param string[] $arrPresets The parameter preset values to use.
  
  @param string[] $arrValues  The dynamic parameter values that may be used.
  
  @return ItemList
  
  @throws \RuntimeException When no filter settings have been set.