protected function updateUserInput(FormStateInterface &$form_state, array $values) {
    $user_input = $form_state->getUserInput();

    if (!empty($user_input['location'])) {
      $user_input['location'] = isset($this->getLocationOptions()['branches'][$values['location']]) || isset($this->getLocationOptions()['camps'][$values['location']]) ? $values['location'] : 'All';
    }
    if (!empty($user_input['program'])) {
      $user_input['program'] = isset($this->getProgramOptions()[$values['program']]) ? $values['program'] : 'all';
    }
    if (!empty($user_input['category'])) {
      $user_input['category'] = isset($this->getCategoryOptions()[$values['category']]) ? $values['category'] : 'all';
    }
    if (!empty($user_input['class'])) {
      $user_input['class'] = isset($this->getClassOptions()[$values['class']]) ? $values['class'] : 'all';
    }
    if (!empty($user_input['time'])) {
      $user_input['time'] = isset($this->getTimeOptions()[$values['time']]) ? $values['time'] : 'all';
    }
    if (!empty($user_input['display'])) {
      $user_input['display'] = !empty($values['display']) ? $values['display'] : 0;
    }

    $form_state->setUserInput($user_input);
  }
protected function updateUserInput(FormStateInterface &$form_state, array $values) {
    $user_input = $form_state->getUserInput();

    if (!empty($user_input['location'])) {
      $user_input['location'] = isset($this->getLocationOptions()['branches'][$values['location']]) || isset($this->getLocationOptions()['camps'][$values['location']]) ? $values['location'] : 'All';
    }
    if (!empty($user_input['program'])) {
      $user_input['program'] = isset($this->getProgramOptions()[$values['program']]) ? $values['program'] : 'all';
    }
    if (!empty($user_input['category'])) {
      $user_input['category'] = isset($this->getCategoryOptions()[$values['category']]) ? $values['category'] : 'all';
    }
    if (!empty($user_input['class'])) {
      $user_input['class'] = isset($this->getClassOptions()[$values['class']]) ? $values['class'] : 'all';
    }
    if (!empty($user_input['time'])) {
      $user_input['time'] = isset($this->getTimeOptions()[$values['time']]) ? $values['time'] : 'all';
    }
    if (!empty($user_input['display'])) {
      $user_input['display'] = !empty($values['display']) ? $values['display'] : 0;
    }

    $form_state->setUserInput($user_input);
  }
protected function updateUserInput ( FormStateInterface & $ form_state , array $ values ) { $ user_input = $ form_state -> getUserInput ( ) ; if ( ! empty ( $ user_input [ 'location' ] ) ) { $ user_input [ 'location' ] = isset ( $ this -> getLocationOptions ( ) [ 'branches' ] [ $ values [ 'location' ] ] ) || isset ( $ this -> getLocationOptions ( ) [ 'camps' ] [ $ values [ 'location' ] ] ) ? $ values [ 'location' ] : 'All' ; } if ( ! empty ( $ user_input [ 'program' ] ) ) { $ user_input [ 'program' ] = isset ( $ this -> getProgramOptions ( ) [ $ values [ 'program' ] ] ) ? $ values [ 'program' ] : 'all' ; } if ( ! empty ( $ user_input [ 'category' ] ) ) { $ user_input [ 'category' ] = isset ( $ this -> getCategoryOptions ( ) [ $ values [ 'category' ] ] ) ? $ values [ 'category' ] : 'all' ; } if ( ! empty ( $ user_input [ 'class' ] ) ) { $ user_input [ 'class' ] = isset ( $ this -> getClassOptions ( ) [ $ values [ 'class' ] ] ) ? $ values [ 'class' ] : 'all' ; } if ( ! empty ( $ user_input [ 'time' ] ) ) { $ user_input [ 'time' ] = isset ( $ this -> getTimeOptions ( ) [ $ values [ 'time' ] ] ) ? $ values [ 'time' ] : 'all' ; } if ( ! empty ( $ user_input [ 'display' ] ) ) { $ user_input [ 'display' ] = ! empty ( $ values [ 'display' ] ) ? $ values [ 'display' ] : 0 ; } $ form_state -> setUserInput ( $ user_input ) ; }
Update form user input.

@param \Drupal\Core\Form\FormStateInterface $form_state
@param \stdClass $options
Update form user input .