public function PushNotificationsTokenQuery::getAllTokens in Push Notifications 8
Get all the push notification tokens.
Return value
array
File
- src/
PushNotificationsTokenQuery.php, line 100 - Contains Drupal\push_notifications\PushNotificationsTokenQuery.
Class
Namespace
Drupal\push_notificationsCode
public function getAllTokens() {
$push_notifications_token_storage = $this->entityManager
->getStorage('push_notifications_token');
$push_notifications_token = $push_notifications_token_storage
->loadMultiple();
// Retrieve all tokens into array.
$tokens = array();
foreach ($push_notifications_token as $pid => $push_notification_token) {
array_push($tokens, $push_notification_token
->getToken());
}
return $tokens;
}