function AjaxHelperTrait::getRequestWrapperFormat

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php \Drupal\Core\Ajax\AjaxHelperTrait::getRequestWrapperFormat()
  2. 10 core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php \Drupal\Core\Ajax\AjaxHelperTrait::getRequestWrapperFormat()
  3. 11.x core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php \Drupal\Core\Ajax\AjaxHelperTrait::getRequestWrapperFormat()

Gets the wrapper format of the current request.

@string The wrapper format.

1 call to AjaxHelperTrait::getRequestWrapperFormat()
AjaxHelperTrait::isAjax in core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php
Determines if the current request is via AJAX.

File

core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php, line 35

Class

AjaxHelperTrait
Provides a helper to determine if the current request is via AJAX.

Namespace

Drupal\Core\Ajax

Code

protected function getRequestWrapperFormat() {
    return \Drupal::request()->get(MainContentViewSubscriber::WRAPPER_FORMAT);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.