You are here

protected function AjaxHelperTrait::getRequestWrapperFormat in Drupal 9

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