You are here

custom_breadcrumbsapi.install in Custom Breadcrumbs 6.2

Same filename and directory in other branches
  1. 7.2 custom_breadcrumbsapi/custom_breadcrumbsapi.install

Install file for the custom_breadcrumbsapi module.

File

custom_breadcrumbsapi/custom_breadcrumbsapi.install
View source
<?php

/**
 * @file
 * Install file for the custom_breadcrumbsapi module.
 */

/**
 * Implements hook_install().
 */
function custom_breadcrumbsapi_install() {
  drupal_install_schema('custom_breadcrumbsapi');
}

/**
 * Implements hook_schema().
 */
function custom_breadcrumbsapi_schema() {
  $schema['custom_breadcrumbsapi'] = array(
    'description' => 'Stores custom breadcrumb for module pages.',
    'fields' => array(
      'bid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Unique identifier for the {custom_breadcrumbsapi}.',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
        'description' => 'An optional name for the custom breadcrumb.',
      ),
      'titles' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => "A return-delimited list of titles for the breadcrumb links.",
      ),
      'paths' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'description' => "A return-delimited list of url paths for the breadcrumb links.",
      ),
      'visibility_php' => array(
        'type' => 'text',
        'not null' => TRUE,
        'size' => 'medium',
        'description' => 'An optional PHP snippet to control the {custom_breadcrumbsapi} visibility.',
      ),
      'module_page' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'description' => "Name of module page implementing custom breadcrumbs.",
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The language this breadcrumb is for; if blank, the breadcrumb will be used for unknown languages.',
      ),
    ),
    'indexes' => array(
      'language' => array(
        'language',
      ),
      'module_language' => array(
        'module_page',
        'language',
      ),
    ),
    'primary key' => array(
      'bid',
    ),
  );
  return $schema;
}

/**
 * Adds name field for improved organization of breadcrumbs
 * Remove set_active_menu field because it is no longer used.
 */
function custom_breadcrumbsapi_update_6200() {
  $ret = array();
  db_add_field($ret, 'custom_breadcrumbsapi', 'name', array(
    'type' => 'varchar',
    'length' => 128,
    'NOT NULL' => FALSE,
    'description' => 'An optional name for the custom breadcrumb.',
  ));
  return $ret;
}

/**
 * Implements hook_uninstall().
 */
function custom_breadcrumbsapi_uninstall() {
  drupal_uninstall_schema('custom_breadcrumbsapi');
}

Functions

Namesort descending Description
custom_breadcrumbsapi_install Implements hook_install().
custom_breadcrumbsapi_schema Implements hook_schema().
custom_breadcrumbsapi_uninstall Implements hook_uninstall().
custom_breadcrumbsapi_update_6200 Adds name field for improved organization of breadcrumbs Remove set_active_menu field because it is no longer used.