function Htmx::redirectHeader

Set HX-Redirect header.

Parameters

\Drupal\Core\Url $url: Destination for a client side redirection.

Return value

static Self for chaining.

See also

https://htmx.org/headers/hx-redirect/

File

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

Class

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

Namespace

Drupal\Core\Htmx

Code

public function redirectHeader(Url $url) : static {
  $this->headers
    ->set('HX-Redirect', $this->urlValue($url));
  return $this;
}

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