function HtmxRequestInfoTrait::isHtmxHistoryRestoration
Determines if if the request is for history restoration.
Sent after a miss in the local history cache
Return value
bool TRUE if the 'HX-History-Restore-Request' header is present.
1 call to HtmxRequestInfoTrait::isHtmxHistoryRestoration()
- HtmxRequestInfoTest::testIsHtmxHistoryRestoration in core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxRequestInfoTest.php - Tests the isHtmxHistoryRestoration method.
File
-
core/
lib/ Drupal/ Core/ Htmx/ HtmxRequestInfoTrait.php, line 58
Class
- HtmxRequestInfoTrait
- Provides methods for getting information about the HTMX request.
Namespace
Drupal\Core\HtmxCode
protected function isHtmxHistoryRestoration() : bool {
return $this->getRequest()->headers
->has('HX-History-Restore-Request');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.