Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Ajax/RedirectCommand.php
- 9 core/lib/Drupal/Core/Ajax/RedirectCommand.php
Namespace
Drupal\Core\Ajax
File
core/lib/Drupal/Core/Ajax/RedirectCommand.php
View source
<?php
namespace Drupal\Core\Ajax;
class RedirectCommand implements CommandInterface {
protected $url;
public function __construct($url) {
$this->url = $url;
}
public function render() {
return [
'command' => 'redirect',
'url' => $this->url,
];
}
}
Classes
Name |
Description |
RedirectCommand |
Defines an AJAX command to set the window.location, loading that URL. |