public function EmptyCartForm::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 FormInterface::submitForm
File
- uc_cart/
src/ Form/ EmptyCartForm.php, line 66
Class
- EmptyCartForm
- Confirm that the customer wants to empty their cart.
Namespace
Drupal\uc_cart\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->cartManager
->emptyCart();
$form_state
->setRedirect('uc_cart.cart');
}