UpdateFeedCommand.php 591 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Drupal\heartbeat\Ajax;
  3. /**
  4. * Created by IntelliJ IDEA.
  5. * User: logicp
  6. * Date: 5/28/17
  7. * Time: 11:38 PM
  8. */
  9. use Drupal\Core\Ajax\CommandInterface;
  10. class UpdateFeedCommand implements CommandInterface {
  11. protected $message;
  12. public function __construct($message) {
  13. $this->message = $message;
  14. }
  15. public function render() {
  16. return array(
  17. 'command' => 'updateFeed',
  18. 'feed' => $this->message->feed,
  19. 'update' => $this->message->update,
  20. 'timestamp' => $this->message->timestamp,
  21. );
  22. }
  23. }