public function CommerceCartRedirectionConfigForm::submitForm in Commerce Cart Redirection 8.2
Same name and namespace in other branches
- 3.0.x src/Form/CommerceCartRedirectionConfigForm.php \Drupal\commerce_cart_redirection\Form\CommerceCartRedirectionConfigForm::submitForm()
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
- src/
Form/ CommerceCartRedirectionConfigForm.php, line 163
Class
- CommerceCartRedirectionConfigForm
- Class CommerceCartRedirectionConfigForm.
Namespace
Drupal\commerce_cart_redirection\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$config = $this
->config('commerce_cart_redirection.settings');
$config
->set('product_bundles', $values['product_bundles']);
$config
->set('negate_product_bundles', $values['negate_product_bundles']);
$config
->set('redirection_route_path', $values['redirection_route_path']);
$config
->set('redirection_route_path_other', $values['redirection_route_path_other']);
$config
->save();
}