taxonomy_title.install in Taxonomy Title 6
Same filename and directory in other branches
Database set up and clean-up for taxonomy title module.
File
taxonomy_title.installView source
<?php
/**
* @file
* Database set up and clean-up for taxonomy title module.
*/
/**
* Implementation of hook_install().
*/
function taxonomy_title_install() {
// Create tables.
drupal_install_schema('taxonomy_title');
}
/**
* Implementation of hook_uninstall().
*/
function taxonomy_title_uninstall() {
// Remove tables.
drupal_uninstall_schema('taxonomy_title');
variable_del('taxonomy_title_headings');
variable_del('taxonomy_title_page_titles');
}
/**
* Implementation of hook_schema().
*/
function taxonomy_title_schema() {
$schema['taxonomy_title'] = array(
'description' => 'Records separate titles/headings for taxonomy term pages',
'fields' => array(
'tid' => array(
'type' => 'int',
'length' => '11',
'unsigned' => TRUE,
'default' => 0,
'not null' => TRUE,
),
'title' => array(
'type' => 'varchar',
'length' => '255',
'default' => '',
'not null' => TRUE,
),
),
'primary key' => array(
'tid',
),
);
return $schema;
}
Functions
Name![]() |
Description |
---|---|
taxonomy_title_install | Implementation of hook_install(). |
taxonomy_title_schema | Implementation of hook_schema(). |
taxonomy_title_uninstall | Implementation of hook_uninstall(). |