You are here

public function QuoteSettingsForm::submitForm in Ubercart 8.4

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

shipping/uc_quote/src/Form/QuoteSettingsForm.php, line 135

Class

QuoteSettingsForm
Default shipping settings form.

Namespace

Drupal\uc_quote\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $quote_config = $this
    ->config('uc_quote.settings');
  $quote_config
    ->set('ship_from_address', $form_state
    ->getValue('address'))
    ->set('display_debug', $form_state
    ->getValue('display_debug'))
    ->set('require_quote', $form_state
    ->getValue('require_quote'))
    ->set('type_weight', $form_state
    ->getValue('type_weight'))
    ->set('shipping_type', $form_state
    ->getValue('uc_store_shipping_type'))
    ->save();
  parent::submitForm($form, $form_state);
}