You are here

public function PrivateMessageInsertMessagesCommand::render in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Ajax/PrivateMessageInsertMessagesCommand.php \Drupal\private_message\Ajax\PrivateMessageInsertMessagesCommand::render()

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

Overrides CommandInterface::render

1 call to PrivateMessageInsertMessagesCommand::render()
PrivateMessageInsertPreviousMessagesCommand::render in src/Ajax/PrivateMessageInsertPreviousMessagesCommand.php
Return an array to be run through json_encode and sent to the client.
1 method overrides PrivateMessageInsertMessagesCommand::render()
PrivateMessageInsertPreviousMessagesCommand::render in src/Ajax/PrivateMessageInsertPreviousMessagesCommand.php
Return an array to be run through json_encode and sent to the client.

File

src/Ajax/PrivateMessageInsertMessagesCommand.php, line 51

Class

PrivateMessageInsertMessagesCommand
Base class for Ajax command to insert messages into a private message thread.

Namespace

Drupal\private_message\Ajax

Code

public function render() {
  return [
    'command' => 'insertPrivateMessages',
    'insertType' => $this->insertType,
    'messages' => $this->messages,
    'messagesCount' => $this->messagesCount,
  ];
}