You are here

protected function AjaxHelperTrait::getRequestWrapperFormat in Drupal 8

Same name and namespace in other branches
  1. 9 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);
}