function RedirectCommand::__construct

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Ajax/RedirectCommand.php \Drupal\Core\Ajax\RedirectCommand::__construct()
  2. 10 core/lib/Drupal/Core/Ajax/RedirectCommand.php \Drupal\Core\Ajax\RedirectCommand::__construct()
  3. 11.x core/lib/Drupal/Core/Ajax/RedirectCommand.php \Drupal\Core\Ajax\RedirectCommand::__construct()

Constructs an RedirectCommand object.

Parameters

string $url: The URL that will be loaded into window.location. This should be a full URL.

File

core/lib/Drupal/Core/Ajax/RedirectCommand.php, line 26

Class

RedirectCommand
Defines an AJAX command to set the window.location, loading that URL.

Namespace

Drupal\Core\Ajax

Code

public function __construct($url) {
    $this->url = $url;
}

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