public function ReactionDeleteForm::submitFormAjax in Context 8.4
Same name and namespace in other branches
- 8 modules/context_ui/src/Form/ReactionDeleteForm.php \Drupal\context_ui\Form\ReactionDeleteForm::submitFormAjax()
- 8.0 modules/context_ui/src/Form/ReactionDeleteForm.php \Drupal\context_ui\Form\ReactionDeleteForm::submitFormAjax()
Handle when the form is submitted through AJAX.
Return value
\Drupal\Core\Ajax\AjaxResponse An AJAX response.
File
- modules/
context_ui/ src/ Form/ ReactionDeleteForm.php, line 142
Class
- ReactionDeleteForm
- Provides a context reaction delete form.
Namespace
Drupal\context_ui\FormCode
public function submitFormAjax() {
$response = new AjaxResponse();
$contextForm = $this->contextManager
->getForm($this->context, 'edit');
$response
->addCommand(new CloseModalDialogCommand());
$response
->addCommand(new ReplaceCommand('#context-reactions', $contextForm['reactions']));
return $response;
}