custom_breadcrumbs.install in Custom Breadcrumbs 7
Same filename and directory in other branches
Install file for the custom_breadcrumbs module.
File
custom_breadcrumbs.installView source
<?php
/**
* @file
* Install file for the custom_breadcrumbs module.
*/
/**
* Implements hook_schema().
*/
function custom_breadcrumbs_schema() {
$schema['custom_breadcrumb'] = array(
'description' => 'Stores custom breadcrumb trail overrides.',
'fields' => array(
'bid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'Unique identifier 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_breadcrumb} visibility.',
),
'node_type' => array(
'type' => 'varchar',
'length' => 64,
'not null' => FALSE,
'default' => 'AND',
'description' => 'Node types the {custom_breadcrumb} should apply to.',
),
),
'primary key' => array(
'bid',
),
);
return $schema;
}
// Add the menu flag.
function custom_breadcrumbs_update_6001() {
db_add_field('custom_breadcrumb', 'set_active_menu', array(
'type' => 'int',
'default' => 1,
'NOT NULL' => TRUE,
));
}
// Remove the menu flag.
function custom_breadcrumbs_update_6101() {
db_drop_field('custom_breadcrumb', 'set_active_menu');
}
Functions
Name![]() |
Description |
---|---|
custom_breadcrumbs_schema | Implements hook_schema(). |
custom_breadcrumbs_update_6001 | |
custom_breadcrumbs_update_6101 |