You are here

public function AlertCommand::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Ajax/AlertCommand.php \Drupal\Core\Ajax\AlertCommand::__construct()
  2. 9 core/lib/Drupal/Core/Ajax/AlertCommand.php \Drupal\Core\Ajax\AlertCommand::__construct()

Constructs an AlertCommand object.

Parameters

string $text: The text to be displayed in the alert box.

File

core/lib/Drupal/Core/Ajax/AlertCommand.php, line 25

Class

AlertCommand
AJAX command for a javascript alert box.

Namespace

Drupal\Core\Ajax

Code

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