function Htmx::encoding
Creates a `data-hx-encoding` attribute.
This attribute instructs HTMX to change the request encoding type.
Parameters
string $method: The encoding method.
Return value
static Returns this object to allow chaining methods.
See also
https://htmx.org/attributes/hx-encoding/
File
-
core/
lib/ Drupal/ Core/ Htmx/ Htmx.php, line 952
Class
- Htmx
- Presents the HTMX controls for developers to use with render arrays.
Namespace
Drupal\Core\HtmxCode
public function encoding(string $method = 'multipart/form-data') : static {
$this->createStringAttribute('hx-encoding', $method);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.