You are here

dynamic_background_views.install in Dynamic Background 7

Installes the database scheme and handles install and uninstall of the module.

File

modules/dynamic_background_views/dynamic_background_views.install
View 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_views_schema() {
  $schema = array();
  $schema['dynamic_background_views'] = array(
    'description' => t('Stores information about dynamic backgrounds for each view display'),
    'fields' => array(
      'view_id' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
      'data' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function dynamic_background_views_install() {
}

/**
 * Implementation of hook_uninstall():
 */
function dynamic_background_views_uninstall() {

  // Remove database table.
  drupal_uninstall_schema('dynamic_background_views');

  // Remove settings.
  variable_del('dynamic_background_views');
  variable_del('dynamic_background_views_css');
  variable_del('dynamic_background_views_image_style');
}

Functions

Namesort descending Description
dynamic_background_views_install Implementation of hook_install().
dynamic_background_views_schema Implementation of hook_schema(), which create the dynamic background table used to store information about user selection of images.
dynamic_background_views_uninstall Implementation of hook_uninstall():