public function ReactionDeleteForm::submitFormAjax in Context 8
Same name and namespace in other branches
- 8.4 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
File
- modules/
context_ui/ src/ Form/ ReactionDeleteForm.php, line 133
Class
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;
}