function Htmx::include

Creates a `data-hx-include` attribute.

This attribute instructs HTMX to include additional element values in HTMX requests.

The descriptor syntax is the same as hx-target. See the documentation link below for more details.

Parameters

string $descriptors: The element descriptors.

Return value

static Returns this object to allow chaining methods.

See also

https://htmx.org/attributes/hx-include/

File

core/lib/Drupal/Core/Htmx/Htmx.php, line 1048

Class

Htmx
Presents the HTMX controls for developers to use with render arrays.

Namespace

Drupal\Core\Htmx

Code

public function include(string $descriptors) : static {
  $this->createStringAttribute('hx-include', $descriptors);
  return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.