class PrivateMessageInsertPreviousMessagesCommand in Private Message 8.2
Same name and namespace in other branches
- 8 src/Ajax/PrivateMessageInsertPreviousMessagesCommand.php \Drupal\private_message\Ajax\PrivateMessageInsertPreviousMessagesCommand
Class to insert older private messages into a private message thread.
Hierarchy
- class \Drupal\private_message\Ajax\PrivateMessageInsertMessagesCommand implements CommandInterface
- class \Drupal\private_message\Ajax\PrivateMessageInsertPreviousMessagesCommand
Expanded class hierarchy of PrivateMessageInsertPreviousMessagesCommand
1 file declares its use of PrivateMessageInsertPreviousMessagesCommand
- AjaxController.php in src/
Controller/ AjaxController.php
File
- src/
Ajax/ PrivateMessageInsertPreviousMessagesCommand.php, line 8
Namespace
Drupal\private_message\AjaxView source
class PrivateMessageInsertPreviousMessagesCommand extends PrivateMessageInsertMessagesCommand {
/**
* Boolean to determine if there are more threads to come.
*
* @var bool
*/
protected $hasNext;
/**
* Constructs a PrivateMessageInsertPreviousMessagesCommand object.
*
* @param string $messages
* The HTML for the messages to be inserted in the page.
* @param int $messagesCount
* The number of messages.
* @param bool $has_next
* A boolean to know if there are more messages after.
*/
public function __construct($messages, $messagesCount, $has_next) {
parent::__construct('previous', $messages, $messagesCount);
$this->hasNext = $has_next;
}
/**
* {@inheritdoc}
*/
public function render() {
$return = parent::render();
$return['hasNext'] = $this->hasNext;
return $return;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PrivateMessageInsertMessagesCommand:: |
protected | property | The type of messages to be inserted in the page. | |
PrivateMessageInsertMessagesCommand:: |
protected | property | The HTML for the messages to be inserted in the page. | |
PrivateMessageInsertPreviousMessagesCommand:: |
protected | property | Boolean to determine if there are more threads to come. | |
PrivateMessageInsertPreviousMessagesCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides PrivateMessageInsertMessagesCommand:: |
|
PrivateMessageInsertPreviousMessagesCommand:: |
public | function |
Constructs a PrivateMessageInsertPreviousMessagesCommand object. Overrides PrivateMessageInsertMessagesCommand:: |