function Html::setIsAjax

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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.