You are here

public function FirebaseMessageService::createCondition in Firebase Push Notification (FCM) 8

Same name and namespace in other branches
  1. 3.0.x src/Service/FirebaseMessageService.php \Drupal\firebase\Service\FirebaseMessageService::createCondition()

Condition pattern for sending message to multiple topics.

Supported operators: &&, ||. Maximum two operators per topic message supported.

Example: "%s && %s" : Send to devices subscribed to topic 1 and topic 2 "%s && (%s || %s)" : Send to devices subscribed to topic 1 and topic 2 or 3

Parameters

string $condition: String for building condition for topics.

See also

https://firebase.google.com/docs/cloud-messaging/send-message#send_messa...

File

src/Service/FirebaseMessageService.php, line 61

Class

FirebaseMessageService
Service for pushing message to mobile devices using Firebase.

Namespace

Drupal\firebase\Service

Code

public function createCondition($condition) {
  $this->condition = $condition;
}