You are here

public function AjaxFormBase::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/AjaxFormBase.php, line 68

Class

AjaxFormBase
Class AjaxFormTrait

Namespace

Drupal\forena\Form

Code

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);
  }
}