public function ConditionDeleteForm::submitFormAjax in Context 8.4
Same name and namespace in other branches
- 8 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
\Drupal\Core\Ajax\AjaxResponse An AJAX response.
File
- modules/context_ui/ src/ Form/ ConditionDeleteForm.php, line 137 
Class
- ConditionDeleteForm
- Provides a Condition delete form.
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;
}