You are here

class PrivateMessageInboxInsertThreadsCommand in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Ajax/PrivateMessageInboxInsertThreadsCommand.php \Drupal\private_message\Ajax\PrivateMessageInboxInsertThreadsCommand

Ajax Command to insert private message inbox threads.

Hierarchy

Expanded class hierarchy of PrivateMessageInboxInsertThreadsCommand

1 file declares its use of PrivateMessageInboxInsertThreadsCommand
AjaxController.php in src/Controller/AjaxController.php

File

src/Ajax/PrivateMessageInboxInsertThreadsCommand.php, line 10

Namespace

Drupal\private_message\Ajax
View source
class PrivateMessageInboxInsertThreadsCommand implements CommandInterface {

  /**
   * The HTML for the threads to be inserted in the page.
   *
   * @var string
   */
  protected $threads;

  /**
   * Constructs a PrivateMessageInboxInsertThreadsCommand object.
   *
   * @param string $threads
   *   The HTML for the threads to be inserted in the page.
   */
  public function __construct($threads) {
    $this->threads = $threads;
  }

  /**
   * {@inheritdoc}
   */
  public function render() {
    return [
      'command' => 'insertInboxOldPrivateMessageThreads',
      'threads' => $this->threads,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PrivateMessageInboxInsertThreadsCommand::$threads protected property The HTML for the threads to be inserted in the page.
PrivateMessageInboxInsertThreadsCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render
PrivateMessageInboxInsertThreadsCommand::__construct public function Constructs a PrivateMessageInboxInsertThreadsCommand object.