closeblock.install in Close Block 7
Same filename and directory in other branches
Install hooks for Closeblock.
File
closeblock.installView source
<?php
/**
* @file
* Install hooks for Closeblock.
*/
/**
* Implements hook_schema().
*/
function closeblock_schema() {
$schema['closeblock'] = array(
'description' => 'Stores block closing information',
'fields' => array(
'module' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => "The module from which the block originates; for example, 'user' for the Who's Online block, and 'block' for any custom blocks.",
),
'delta' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '0',
'description' => 'Unique ID for block within a module.',
),
'theme' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => 'The theme under which the block settings apply.',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => "User's {users}.uid.",
),
'count' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Count of closing',
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => 'Timestamp for when user has closed block.',
),
),
'unique keys' => array(
'tmdu' => array(
'theme',
'module',
'delta',
'uid',
),
),
'indexes' => array(
'list' => array(
'theme',
'module',
'uid',
),
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function closeblock_uninstall() {
variable_del('closeblock_settings');
}
Functions
Name | Description |
---|---|
closeblock_schema | Implements hook_schema(). |
closeblock_uninstall | Implements hook_uninstall(). |