You are here

hansel.install in Hansel breadcrumbs 7

Same filename and directory in other branches
  1. 8 hansel.install

Hansel installation file

File

hansel.install
View source
<?php

/**
 * @file
 * Hansel installation file
 */

/**
 * Implements hook_uninstall().
 */
function hansel_uninstall() {
  variable_del('hansel_breadcrumb_last_item_link');
  variable_del('hansel_breadcrumb_last_item_hide');
  variable_del('hansel_max_item_length');
  variable_del('hansel_trim_on_word_boundary');
  variable_del('hansel_trim_ellipsis');
  variable_del('hansel_max_item_count');
  variable_del('hansel_removed_items_replacement');
  variable_del('hansel_cache');
  variable_del('hansel_set_menu_name');
}

/**
 * Implements hook_schema().
 */
function hansel_schema() {
  $schema = array();
  $schema['hansel_rule'] = array(
    'fields' => array(
      'rid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'pid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'crumb_action' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => FALSE,
      ),
      'crumb_action_arguments' => array(
        'type' => 'text',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'rid',
    ),
  );
  $schema['hansel_rule_action_goto'] = array(
    'fields' => array(
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'destination' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'rid',
    ),
  );
  $schema['hansel_rule_action_leave'] = array(
    'fields' => array(
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'restore_original' => array(
        'type' => 'int',
        'size' => 'small',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'rid',
    ),
  );
  $schema['hansel_rule_action_switch'] = array(
    'fields' => array(
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'handler' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
      ),
      'arguments' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'rid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
hansel_schema Implements hook_schema().
hansel_uninstall Implements hook_uninstall().