You are here

blockcache_alter.install in Block Cache Alter 6

Same filename and directory in other branches
  1. 7 blockcache_alter.install

Install file.

File

blockcache_alter.install
View source
<?php

/**
 * @file
 * Install file.
 */

/**
 * Implementation of hook_install().
 */
function blockcache_alter_install() {
  drupal_install_schema('blockcache_alter');
}

/**
 * Implementation of hook_uninstall().
 */
function blockcache_alter_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'bc_%'");
  variable_del('bca_debug');
  variable_del('bca_corepatch');
}

/**
 * Implementation of hook_schema().
 */
function blockcache_alter_schema() {
  $schema['blockcache_alter'] = array(
    'description' => 'Stores cache settings for blocks.',
    '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.',
      ),
      'cache' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
        'description' => 'Binary flag to indicate block cache mode. (-1: Do not cache, 1: Cache per role, 2: Cache per user, 4: Cache per page, 8: Block cache global) See BLOCK_CACHE_* constants in block.module for more detailed information.',
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_update_N().
 */
function blockcache_alter_update_6001() {
  drupal_install_schema('blockcache_alter');
  return array();
}

Functions

Namesort descending Description
blockcache_alter_install Implementation of hook_install().
blockcache_alter_schema Implementation of hook_schema().
blockcache_alter_uninstall Implementation of hook_uninstall().
blockcache_alter_update_6001 Implementation of hook_update_N().