public function OrderSettingsForm::submitForm in Commerce Core 8.2
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
- modules/order/ src/ Form/ OrderSettingsForm.php, line 88 
Class
Namespace
Drupal\commerce_order\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $config = $this
    ->config('commerce_order.settings');
  $config
    ->set('log_version_mismatch', (bool) $form_state
    ->getValue('log_version_mismatch'));
  $config
    ->save();
  // Rebuild entity type definitions so that the commerce_order entity type
  // definition respects the `log_version_mismatch` value.
  $this->entityTypeManager
    ->clearCachedDefinitions();
}