icon_block.install in Icon API 7
Same filename and directory in other branches
icon_block.install Install, update and uninstall functions for the icon_block.module.
File
modules/icon_block/icon_block.installView 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
Name | Description |
---|---|
icon_block_install | Implements hook_install(). |
icon_block_schema_alter | Implements hook_schema_alter(). |
icon_block_uninstall | Implements hook_uninstall(). |