class PrivateMessageInboxUpdateCommand in Private Message 8
Same name and namespace in other branches
- 8.2 src/Ajax/PrivateMessageInboxUpdateCommand.php \Drupal\private_message\Ajax\PrivateMessageInboxUpdateCommand
Ajax command to update the private message inbox block.
Hierarchy
- class \Drupal\private_message\Ajax\PrivateMessageInboxUpdateCommand implements CommandInterface
Expanded class hierarchy of PrivateMessageInboxUpdateCommand
1 file declares its use of PrivateMessageInboxUpdateCommand
- AjaxController.php in src/
Controller/ AjaxController.php
File
- src/
Ajax/ PrivateMessageInboxUpdateCommand.php, line 10
Namespace
Drupal\private_message\AjaxView source
class PrivateMessageInboxUpdateCommand implements CommandInterface {
/**
* The thread IDs, in the order that they should appear upon update.
*
* @var array
*/
protected $threadIds;
/**
* HTML for any threads that don't currently exist in the inbox.
*
* @var array
*/
protected $newThreads;
/**
* Constructs a PrivateMessageInboxUpdateCommand object.
*
* @param array $threadIds
* The thread IDs, in the order that they should appear when the inbox is
* updated.
* @param array $newThreads
* The HTML for the messages to be inserted in the page.
*/
public function __construct(array $threadIds, array $newThreads) {
$this->threadIds = $threadIds;
$this->newThreads = $newThreads;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'privateMessageInboxUpdate',
'threadIds' => $this->threadIds,
'newThreads' => $this->newThreads,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrivateMessageInboxUpdateCommand:: |
protected | property | HTML for any threads that don't currently exist in the inbox. | |
PrivateMessageInboxUpdateCommand:: |
protected | property | The thread IDs, in the order that they should appear upon update. | |
PrivateMessageInboxUpdateCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
PrivateMessageInboxUpdateCommand:: |
public | function | Constructs a PrivateMessageInboxUpdateCommand object. |