function HtmxRequestInfoTrait::isHtmxBoosted
Determines if the request is boosted by HTMX.
Return value
bool TRUE if the 'HX-Boosted' header is present.
1 call to HtmxRequestInfoTrait::isHtmxBoosted()
- HtmxRequestInfoTest::testIsHtmxBoosted in core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxRequestInfoTest.php - Tests the isHtmxBoosted method.
File
-
core/
lib/ Drupal/ Core/ Htmx/ HtmxRequestInfoTrait.php, line 36
Class
- HtmxRequestInfoTrait
- Provides methods for getting information about the HTMX request.
Namespace
Drupal\Core\HtmxCode
protected function isHtmxBoosted() : bool {
return $this->getRequest()->headers
->has('HX-Boosted');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.