Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MessageCommand.php

function MessageCommand::render

Overrides CommandInterface::render

File

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

Class

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

Namespace

Drupal\Core\Ajax

Code

public function render() {
    return [
        'command' => 'message',
        'message' => $this->message instanceof MarkupInterface ? (string) $this->message : Xss::filterAdmin($this->message),
        'messageWrapperQuerySelector' => $this->wrapperQuerySelector,
        'messageOptions' => $this->options,
        'clearPrevious' => $this->clearPrevious,
    ];
}
RSS feed
Powered by Drupal