You are here

cctags.install in cctags 7

Same filename and directory in other branches
  1. 8 cctags.install
  2. 6 cctags.install

install/uninstall cctags variavles and scheme

File

cctags.install
View source
<?php

/**
 * @file
 *  install/uninstall  cctags variavles and scheme
 */
function cctags_uninstall() {
  db_delete('variable')
    ->condition('name', 'cctags%%', 'LIKE')
    ->execute();
  cache_clear_all('cctags', 'cache', TRUE);
  menu_rebuild();
}
function cctags_schema() {
  $schema['cctags'] = array(
    'fields' => array(
      'cctid' => array(
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
      'block' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'block_name' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
      ),
      'page' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'page_title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'page_path' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'page_level' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 6,
      ),
      'page_amount' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'page_sort' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => 'title,asc',
      ),
      'page_mode' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => 'mixed',
      ),
      'page_vocname' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'page_extra_class' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'item_data' => array(
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'cctid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
cctags_schema
cctags_uninstall @file install/uninstall cctags variavles and scheme