Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Component/Utility/Html.php \Drupal\Component\Utility\Html::setIsAjax()
  2. 9 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.

2 calls to Html::setIsAjax()
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 142

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