You are here

protected function AjaxHelperTrait::getRequestWrapperFormat in Drupal 10

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

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);
}