You are here

public function PushNotificationsBroadcasterApns::setMessage in Push Notifications 8

Setter function for message.

Parameters

$message:

Overrides PushNotificationsBroadcasterInterface::setMessage

File

src/PushNotificationsBroadcasterApns.php, line 108
Contains \Drupal\push_notifications\PushNotificationsBroadcasterApns.

Class

PushNotificationsBroadcasterApns
Broadcasts Android messages.

Namespace

Drupal\push_notifications

Code

public function setMessage($message) {
  $this->message = $message;

  // Set the payload.
  $this->payload = array(
    'aps' => array(
      'alert' => $message,
    ),
  );
}