public function GroupDeleteForm::submitFormAjax in Context groups 8
Same name and namespace in other branches
- 8.2 src/Form/GroupDeleteForm.php \Drupal\context_groups\Form\GroupDeleteForm::submitFormAjax()
Handle when the form is submitted trough AJAX.
Return value
AjaxResponse AjaxResponse object.
File
- src/
Form/ GroupDeleteForm.php, line 148
Class
- GroupDeleteForm
- Class GroupDeleteForm.
Namespace
Drupal\context_groups\FormCode
public function submitFormAjax() {
$contextForm = $this->contextManager
->getForm($this->context, 'edit');
$response = new AjaxResponse();
$response
->addCommand(new CloseModalDialogCommand());
$response
->addCommand(new ReplaceCommand('#context-reactions', $contextForm['reactions']));
return $response;
}