protected function WishlistShareForm::successfulAjaxSubmit in Commerce Wishlist 8.3
Allows the form to respond to a successful AJAX submission.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
\Drupal\Core\Ajax\AjaxResponse An AJAX response.
Overrides AjaxFormHelperTrait::successfulAjaxSubmit
File
- src/
Form/ WishlistShareForm.php, line 100
Class
- WishlistShareForm
- Provides the wishlist share form.
Namespace
Drupal\commerce_wishlist\FormCode
protected function successfulAjaxSubmit(array $form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$response
->addCommand(new PrependCommand('.commerce-wishlist-form', [
'#type' => 'status_messages',
]));
$response
->addCommand(new CloseDialogCommand());
return $response;
}