hubspot.install in HubSpot 6
Same filename and directory in other branches
Implement install/uninstall hooks and warn about webform component errors on disable.
File
hubspot.installView source
<?php
/**
* @file
* Implement install/uninstall hooks and warn about webform component errors on disable.
*/
/**
* Implements hook_install() to notify user of successful installation.
*/
function hubspot_install() {
drupal_set_message(st('The HubSpot module has been successfully installed. Configure it in the !link.', array(
'!link' => l('HubSpot integration settings', 'admin/settings/hubspot'),
)), 'status');
}
/**
* Implements hook_uninstall() to remove our saved variables and all traces of the hubspot_url component
*/
function hubspot_uninstall() {
variable_del('hubspot_debug_on');
variable_del('hubspot_debug_email');
variable_del('hubspot_apikey');
variable_del('hubspot_log_code');
db_query("DELETE FROM {webform_component} WHERE `type` = 'hubspot_url'");
}
/**
* Implements hook_disable() to warn of possible errors with HubSpot webforms.
*/
function hubspot_disable() {
drupal_set_message(st('With the HubSpot module disabled, you may experience errors viewing and editing your HubSpot-enabled forms. Delete the HubSpot POST URL field or uninstall this module entirely to clear the errors.'), 'warning');
}
Functions
Name | Description |
---|---|
hubspot_disable | Implements hook_disable() to warn of possible errors with HubSpot webforms. |
hubspot_install | Implements hook_install() to notify user of successful installation. |
hubspot_uninstall | Implements hook_uninstall() to remove our saved variables and all traces of the hubspot_url component |