function _firebase_isParamValid in Firebase Push Notification (FCM) 7
Validate mandatory data on received parameters.
Parameters
array $param: Params that builds Push notification payload.
Return value
bool TRUE|FALSE - if mandatory data is present.
1 call to _firebase_isParamValid()
- _firebase_buildMessage in ./
firebase.module - Builds the push notification body.
File
- ./
firebase.module, line 262
Code
function _firebase_isParamValid(array $param) {
// We either have the title and body OR
// it's a silent push - require $param['data'].
if (!empty($param['title']) && !empty($param['body'])) {
return TRUE;
}
if (isset($param['data']) && firebase_checkReservedKeywords($param['data'])) {
return TRUE;
}
return FALSE;
}