You are here

icon_block.install in Icon API 7

Same filename and directory in other branches
  1. 8 modules/icon_block/icon_block.install

icon_block.install Install, update and uninstall functions for the icon_block.module.

File

modules/icon_block/icon_block.install
View source
<?php

/**
 * @file
 * icon_block.install
 * Install, update and uninstall functions for the icon_block.module.
 */

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

  // Add fields to existing database table.
  module_load_install('icon');
  icon_install_create_fields('block', array(
    'icon',
  ));

  // Set module weight.
  icon_set_module_weight('icon_block');
}

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

  // Drop icon field from {block} table in database.
  db_drop_field('block', 'icon');
}

/**
 * Implements hook_schema_alter().
 *
 * Add icon field to {block} table in database.
 */
function icon_block_schema_alter(&$schema) {
  $schema['block']['fields']['icon'] = array(
    'description' => 'A serialized array of settings for Icon API.',
    'type' => 'blob',
    'size' => 'normal',
  );
}

Functions