public function WebformAnnounceCommand::__construct in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Ajax/WebformAnnounceCommand.php \Drupal\webform\Ajax\WebformAnnounceCommand::__construct()
Constructs a WebformAnnounceCommand object.
Parameters
string $text: A string to be read by the UA.
string $priority: A string to indicate the priority of the message. Can be either 'polite' or 'assertive'.
File
- src/
Ajax/ WebformAnnounceCommand.php, line 39
Class
- WebformAnnounceCommand
- Provides an Ajax command to trigger audio UAs to read the supplied text.
Namespace
Drupal\webform\AjaxCode
public function __construct($text, $priority = 'polite') {
$this->text = $text;
$this->priority = $priority;
}