function HtmxRequestInfoTrait::isHtmxRequest
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Htmx/HtmxRequestInfoTrait.php \Drupal\Core\Htmx\HtmxRequestInfoTrait::isHtmxRequest()
Determines if the request is sent by HTMX.
Return value
bool TRUE if the 'HX-Request' header is present.
File
-
core/
lib/ Drupal/ Core/ Htmx/ HtmxRequestInfoTrait.php, line 26
Class
- HtmxRequestInfoTrait
- Provides methods for getting information about the HTMX request.
Namespace
Drupal\Core\HtmxCode
protected function isHtmxRequest() : bool {
return $this->getRequest()->headers
->has('HX-Request');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.