public function AjaxFormTrait::submitCallback in Forena Reports 8
Ajax callback handler for submit buttons.
Parameters
array $form: Form array
\Drupal\Core\Form\FormStateInterface $form_state: Drupal form state object.
Return value
\Drupal\Core\Ajax\AjaxResponse The ajax response object used to update the page.
File
- src/
Form/ AjaxFormTrait.php, line 45
Class
- AjaxFormTrait
- Class AjaxFormTrait
Namespace
Drupal\forena\FormCode
public function submitCallback(&$form, FormStateInterface $form_state) {
if ($this->controller->is_modal_form) {
return $this
->ajaxModalCallback($form, $form_state);
}
else {
return $this
->ajaxCallback($form, $form_state);
}
}