hubspot.install in HubSpot 7.3
Same filename and directory in other branches
Installation file for hubspot.
File
hubspot.installView source
<?php
/**
* @file
* Installation file for hubspot.
*/
/**
* Implements hook_install().
*/
function hubspot_install() {
$t = get_t();
drupal_set_message($t('The HubSpot module has been successfully installed. Configure it in the !link.', array(
'!link' => l($t('HubSpot integration settings'), 'admin/config/services/hubspot'),
)), 'status');
}
/**
* Implements hook_uninstall().
*/
function hubspot_uninstall() {
variable_del('hubspot_debug_on');
variable_del('hubspot_debug_email');
variable_del('hubspot_log_code');
variable_del('hubspot_access_token');
variable_del('hubspot_refresh_token');
variable_del('hubspot_expires_in');
variable_del('hubspot_portalid');
}
/**
* Initial introduction of the schema.
*/
function hubspot_update_7201() {
$schema['hubspot'] = array(
'description' => 'Base table for hubspot. Stores field mappings from webform fields to hubspot form fields.',
'fields' => array(
'nid' => array(
'description' => 'The node id of the webform for this row.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'hubspot_guid' => array(
'description' => 'The hubspot form guid for this row.',
'type' => 'text',
),
'webform_field' => array(
'description' => 'The webform field key for this row.',
'type' => 'text',
),
'hubspot_field' => array(
'description' => 'The hubspot field key for this row.',
'type' => 'text',
),
),
'indexes' => array(
'nid' => array(
'nid',
array(
'hubspot_guid',
128,
),
array(
'webform_field',
128,
),
array(
'hubspot_field',
128,
),
),
),
);
db_create_table('hubspot', $schema['hubspot']);
}
/**
* Enable automate and hubspot_webform module.
*/
function hubspot_update_7202() {
module_enable(array(
'automate',
'hubspot_webform',
));
return t('Enabled automate and hubspot_webform module.');
}
Functions
Name | Description |
---|---|
hubspot_install | Implements hook_install(). |
hubspot_uninstall | Implements hook_uninstall(). |
hubspot_update_7201 | Initial introduction of the schema. |
hubspot_update_7202 | Enable automate and hubspot_webform module. |