You are here

book_helper.install in Book helper 7

Same filename and directory in other branches
  1. 6 book_helper.install

Install and uninstall functions for the 'Book helper' module.

File

book_helper.install
View source
<?php

/**
 * @file
 * Install and uninstall functions for the 'Book helper' module.
 */

/**
 * Implements hook_install().
 */
function book_helper_install() {

  // Set weight=10 so that the book_helper.module is called after the book.module.
  db_update('system')
    ->fields(array(
    'weight' => 10,
  ))
    ->condition('name', 'book_helper')
    ->execute();
}

/**
 * Implements hook_uninstall().
 */
function book_helper_uninstall() {

  // Delete all the book helper variables and then clear the variable cache.
  db_delete('variable')
    ->condition('name', 'book_helper_%', 'LIKE')
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');
}

Functions