class PrivateMessageInsertThreadCommand in Private Message 8
Same name and namespace in other branches
- 8.2 src/Ajax/PrivateMessageInsertThreadCommand.php \Drupal\private_message\Ajax\PrivateMessageInsertThreadCommand
Ajax command to insert a thread into the private message page.
Hierarchy
- class \Drupal\private_message\Ajax\PrivateMessageInsertThreadCommand implements CommandInterface
Expanded class hierarchy of PrivateMessageInsertThreadCommand
1 file declares its use of PrivateMessageInsertThreadCommand
- AjaxController.php in src/
Controller/ AjaxController.php
File
- src/
Ajax/ PrivateMessageInsertThreadCommand.php, line 10
Namespace
Drupal\private_message\AjaxView source
class PrivateMessageInsertThreadCommand implements CommandInterface {
/**
* The HTML of the thread to be inserted.
*
* @var string
*/
protected $thread;
/**
* Constructs a PrivateMessageInsertThreadCommand object.
*
* @param string $thread
* The HTML of the thread to be inserted.
*/
public function __construct($thread) {
$this->thread = $thread;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'privateMessageInsertThread',
'thread' => $this->thread,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrivateMessageInsertThreadCommand:: |
protected | property | The HTML of the thread to be inserted. | |
PrivateMessageInsertThreadCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
PrivateMessageInsertThreadCommand:: |
public | function | Constructs a PrivateMessageInsertThreadCommand object. |