You are here

class ClearPreviewCommand in Heartbeat 8

Hierarchy

Expanded class hierarchy of ClearPreviewCommand

1 file declares its use of ClearPreviewCommand
StatusForm.php in modules/statusmessage/src/Form/StatusForm.php

File

src/Ajax/ClearPreviewCommand.php, line 14

Namespace

Drupal\heartbeat\Ajax
View source
class ClearPreviewCommand implements CommandInterface {
  protected $message;
  public function __construct($message) {
    $this->message = $message;
  }
  public function render() {
    return array(
      'command' => 'clearPreview',
      'clear' => $this->message,
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ClearPreviewCommand::$message protected property
ClearPreviewCommand::render public function Return an array to be run through json_encode and sent to the client. Overrides CommandInterface::render
ClearPreviewCommand::__construct public function