You are here

word_link.install in Word Link 8

Same filename and directory in other branches
  1. 7.2 word_link.install
  2. 7 word_link.install

Install, update, and uninstall functions for the word_link module.

File

word_link.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for the word_link module.
 */

/**
 * Implements hook_install().
 */
function word_link_install() {
  $t = get_t();
  drupal_set_message($t('Word Link module succesfully installed. Visit the <a href="@link">configuration page</a>.', array(
    '@link' => url('admin/config/content/word-link/configuration'),
  )));
}

/**
 * Implements of hook_uninstall().
 */
function word_link_uninstall() {
  variable_del('word_link_limit');
  variable_del('word_link_tags_except');
  variable_del('word_link_node_types');
  variable_del('word_link_css');
}

/**
 * Implements of hook_schema().
 */
function word_link_schema() {
  $schema['word_link'] = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'text' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'case_sensitive' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 1,
        'size' => 'tiny',
      ),
      'url' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'url_title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'class' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'word-link',
      ),
      'visibility' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
      'except' => array(
        'type' => 'text',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
word_link_install Implements hook_install().
word_link_schema Implements of hook_schema().
word_link_uninstall Implements of hook_uninstall().