function Htmx::triggerAfterSettleHeader
Set HX-Trigger-After-Settle header.
See the documentation for the structure of the array.
Parameters
string|array $data: An event name or an array which will be JSON encoded.
Return value
static Self for chaining.
See also
https://htmx.org/headers/hx-trigger/
File
-
core/
lib/ Drupal/ Core/ Htmx/ Htmx.php, line 483
Class
- Htmx
- Presents the HTMX controls for developers to use with render arrays.
Namespace
Drupal\Core\HtmxCode
public function triggerAfterSettleHeader(string|array $data) : static {
if (is_array($data)) {
$data = json_encode($data);
}
$this->headers
->set('HX-Trigger-After-Settle', $data);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.