You are here

protected function AdvaggFormBase::isAjax in Advanced CSS/JS Aggregation 8.3

Same name and namespace in other branches
  1. 8.4 src/Form/AdvaggFormBase.php \Drupal\advagg\Form\AdvaggFormBase::isAjax()
  2. 8.2 src/Form/AdvaggFormBase.php \Drupal\advagg\Form\AdvaggFormBase::isAjax()

Checks if the form was submitted by AJAX.

Return value

bool TRUE if the form was submitted via AJAX, otherwise FALSE.

File

src/Form/AdvaggFormBase.php, line 52

Class

AdvaggFormBase
View AdvAgg information for this site.

Namespace

Drupal\advagg\Form

Code

protected function isAjax() {
  $request = $this->requestStack
    ->getCurrentRequest();
  if ($request->query
    ->has(FormBuilderInterface::AJAX_FORM_REQUEST)) {
    return TRUE;
  }
  return FALSE;
}