You are here

fe_block.install in Features Extra 6

File

fe_block.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function fe_block_install() {
  drupal_install_schema('fe_block');
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'block'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_block'", $weight + 1);
}

/**
 * Implementation of hook_update_N().
 * Adjust module weight.
 */
function fe_block_update_6011() {
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'block'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_block'", $weight + 1);
}

/**
 * Implementation of hook_uninstall().
 */
function fe_block_uninstall() {
  drupal_uninstall_schema('fe_block');
}

/**
 * Implementation of hook_schema().
 */
function fe_block_schema() {
  $schema['fe_block_boxes'] = array(
    'description' => '',
    'export' => array(
      'key' => 'machine_name',
      'can disable' => FALSE,
    ),
    'fields' => array(
      'bid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'machine_name' => array(
        'description' => 'machine_name',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'indexes' => array(
      'machine_name' => array(
        'machine_name',
      ),
    ),
    'primary key' => array(
      'bid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
fe_block_install Implementation of hook_install().
fe_block_schema Implementation of hook_schema().
fe_block_uninstall Implementation of hook_uninstall().
fe_block_update_6011 Implementation of hook_update_N(). Adjust module weight.