firebase.install in Firebase Push Notification (FCM) 7
Same filename and directory in other branches
File
firebase.installView source
<?php
/**
* Implements hook_requirements().
*/
function firebase_requirements($phase) {
// We use cURL in order to send push notifications.
// Checks if cURl is available.
$requirements = array();
$t = get_t();
if ($phase == 'install' && !in_array('curl', get_loaded_extensions())) {
$requirements['firebase'] = array(
'title' => $t('cURL'),
'description' => $t('Firebase needs cURL enabled.'),
'value' => $t('not available'),
'severity' => REQUIREMENT_ERROR,
);
}
return $requirements;
}
/**
* Implements hook_uninstall().
*/
function firebase_uninstall() {
// Remove variables
variable_del('firebase_server_key');
variable_del('firebase_endpoint');
}
Functions
Name | Description |
---|---|
firebase_requirements | Implements hook_requirements(). |
firebase_uninstall | Implements hook_uninstall(). |