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