dynamic_background_user.install in Dynamic Background 7
Same filename and directory in other branches
Installes the database scheme and handles install and uninstall of the module.
File
modules/dynamic_background_user/dynamic_background_user.installView source
<?php
/**
* @file
* Installes the database scheme and handles install and uninstall of the
* module.
*/
/**
* Implementation of hook_schema(), which create the dynamic background table
* used to store information about user selection of images.
*/
function dynamic_background_user_schema() {
$schema = array();
$schema['dynamic_background_user'] = array(
'description' => t('Stores information about dynamic backgrounds for each user'),
'fields' => array(
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'data' => array(
'type' => 'text',
'not null' => TRUE,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
return $schema;
}
/**
* Implementation of hook_install().
*/
function dynamic_background_user_install() {
}
/**
* Implementation of hook_uninstall():
*/
function dynamic_background_user_uninstall() {
// Remove database table.
drupal_uninstall_schema('dynamic_background_user');
// Remove settings.
variable_del('dynamic_background_user_css');
variable_del('dynamic_background_user_image_style');
}
Functions
Name | Description |
---|---|
dynamic_background_user_install | Implementation of hook_install(). |
dynamic_background_user_schema | Implementation of hook_schema(), which create the dynamic background table used to store information about user selection of images. |
dynamic_background_user_uninstall | Implementation of hook_uninstall(): |