public function MessageCommand::render in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Ajax/MessageCommand.php \Drupal\Core\Ajax\MessageCommand::render()
Return an array to be run through json_encode and sent to the client.
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\AjaxCode
public function render() {
return [
'command' => 'message',
'message' => $this->message,
'messageWrapperQuerySelector' => $this->wrapperQuerySelector,
'messageOptions' => $this->options,
'clearPrevious' => $this->clearPrevious,
];
}