You are here

public function WebformAnnounceCommand::render in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Ajax/WebformAnnounceCommand.php \Drupal\webform\Ajax\WebformAnnounceCommand::render()

Return an array to be run through json_encode and sent to the client.

Overrides CommandInterface::render

File

src/Ajax/WebformAnnounceCommand.php, line 47

Class

WebformAnnounceCommand
Provides an Ajax command to trigger audio UAs to read the supplied text.

Namespace

Drupal\webform\Ajax

Code

public function render() {
  return [
    'command' => 'webformAnnounce',
    'text' => $this->text,
    'priority' => $this->priority,
  ];
}