function Htmx::selectOob
Creates a `data-hx-select-oob` attribute.
This attribute instructs HTMX to select content for an out-of-band swap from a response. Each value can specify any valid hx-swap strategy by separating the selector and the swap strategy with a colon, such as #alert:afterbegin.
Parameters
string|string[] $selectors: A value or array of values.
Return value
static Returns this object to allow chaining methods.
See also
https://htmx.org/attributes/hx-select-oob/
File
-
core/
lib/ Drupal/ Core/ Htmx/ Htmx.php, line 710
Class
- Htmx
- Presents the HTMX controls for developers to use with render arrays.
Namespace
Drupal\Core\HtmxCode
public function selectOob(string|array $selectors) : static {
if (is_array($selectors)) {
$selectors = implode(',', $selectors);
}
$this->createStringAttribute('hx-select-oob', $selectors);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.