public function BlockDeleteForm::submitFormAjax in Context 8
Same name and namespace in other branches
- 8.4 src/Reaction/Blocks/Form/BlockDeleteForm.php \Drupal\context\Reaction\Blocks\Form\BlockDeleteForm::submitFormAjax()
- 8.0 src/Reaction/Blocks/Form/BlockDeleteForm.php \Drupal\context\Reaction\Blocks\Form\BlockDeleteForm::submitFormAjax()
Handle when the form is submitted trough AJAX.
Return value
File
- src/
Reaction/ Blocks/ Form/ BlockDeleteForm.php, line 141
Class
Namespace
Drupal\context\Reaction\Blocks\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;
}