function MessageCommand::render

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

Overrides CommandInterface::render

File

core/lib/Drupal/Core/Ajax/MessageCommand.php, line 82

Class

MessageCommand
AJAX command for a JavaScript Drupal.message() call.

Namespace

Drupal\Core\Ajax

Code

public function render() {
    return [
        'command' => 'message',
        'message' => $this->message,
        'messageWrapperQuerySelector' => $this->wrapperQuerySelector,
        'messageOptions' => $this->options,
        'clearPrevious' => $this->clearPrevious,
    ];
}

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