You are here

class PushNotificationsMessageSenderList in Push Notifications 8

Send a simple message alert to a list of tokens. Use this if you want to preopulate the list of tokens.

Hierarchy

Expanded class hierarchy of PushNotificationsMessageSenderList

1 string reference to 'PushNotificationsMessageSenderList'
push_notifications.services.yml in ./push_notifications.services.yml
push_notifications.services.yml
1 service uses PushNotificationsMessageSenderList
push_notifications.message_sender_list in ./push_notifications.services.yml
Drupal\push_notifications\PushNotificationsMessageSenderList

File

src/PushNotificationsMessageSenderList.php, line 14
Contains \Drupal\push_notifications\PushNotificationsMessageSenderList.

Namespace

Drupal\push_notifications
View source
class PushNotificationsMessageSenderList extends PushNotificationsMessageSenderBase {

  /**
   * @var array $tokens
   *   Recipient tokens.
   */
  protected $tokens;

  /**
   * Constructor.
   *
   * @param \Drupal\push_notifications\PushNotificationsDispatcher $dispatcher
   *   Alert Dispatcher.
   */
  public function __construct(PushNotificationsDispatcher $dispatcher) {
    $this->dispatcher = $dispatcher;
  }

  /**
   * {@inheritdoc}
   */
  public function setTokens($tokens) {
    $this->tokens = $tokens;
  }

  /**
   * Tokens don't need to be generated, but function
   * required for abstract base class.
   */
  public function generateTokens() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PushNotificationsMessageSenderBase::$dispatcher protected property Alert Dispatcher.
PushNotificationsMessageSenderBase::$message protected property The message that will be used in the payload.
PushNotificationsMessageSenderBase::$networks protected property Target Networks.
PushNotificationsMessageSenderBase::$results protected property Result data.
PushNotificationsMessageSenderBase::dispatch public function Dispatch an alert.
PushNotificationsMessageSenderBase::getResults public function Getter function for results.
PushNotificationsMessageSenderBase::setMessage public function Setter function for message.
PushNotificationsMessageSenderBase::setNetworks public function Setter functions for networks.
PushNotificationsMessageSenderList::$tokens protected property Recipient tokens. Overrides PushNotificationsMessageSenderBase::$tokens
PushNotificationsMessageSenderList::generateTokens public function Tokens don't need to be generated, but function required for abstract base class. Overrides PushNotificationsMessageSenderBase::generateTokens
PushNotificationsMessageSenderList::setTokens public function
PushNotificationsMessageSenderList::__construct public function Constructor. Overrides PushNotificationsMessageSenderBase::__construct