You are here

public static function Html::setIsAjax in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Utility/Html.php \Drupal\Component\Utility\Html::setIsAjax()

Sets if this request is an Ajax request.

Parameters

bool $is_ajax: TRUE if this request is an Ajax request, FALSE otherwise.

3 calls to Html::setIsAjax()
AjaxResponseSubscriber::onRequest in core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php
Sets the AJAX parameter from the current request.
HtmlTest::testHtmlGetId in core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
Tests the Html::getUniqueId() method.
HtmlTest::testHtmlGetUniqueIdWithAjaxIds in core/tests/Drupal/Tests/Component/Utility/HtmlTest.php
Tests the Html::getUniqueId() method.

File

core/lib/Drupal/Component/Utility/Html.php, line 139

Class

Html
Provides DOMDocument helpers for parsing and serializing HTML strings.

Namespace

Drupal\Component\Utility

Code

public static function setIsAjax($is_ajax) {
  static::$isAjax = $is_ajax;
}