function AjaxHelperTrait::getRequestWrapperFormat

Same name in other branches
  1. 9 core/lib/Drupal/Core/Ajax/AjaxHelperTrait.php \Drupal\Core\Ajax\AjaxHelperTrait::getRequestWrapperFormat()
  2. 8.9.x 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.

Return value

string|null The wrapper format. NULL if the wrapper format is not set.

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 33

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.