home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (advanced_help.install)

This example Drupal source code file (advanced_help.install) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, default, description, function, not, null, php, search, this, topic, true, type, varchar

The advanced_help.install Drupal example source code

<?php
// $Id: advanced_help.install,v 1.3 2008/04/19 16:45:57 merlinofchaos Exp $
/**
 * @file advanced_help.install
 * Contains install and update functions for advanced_help.
 */

function advanced_help_install() {
  drupal_set_message('Installing advanced_help.');
  drupal_install_schema('advanced_help');
}

function advanced_help_uninstall() {
  drupal_uninstall_schema('advanced_help');
  variable_del('advanced_help_last_cron');
}

/**
 * advanced_help's initial schema.
 */
function advanced_help_schema() {
  $schema['advanced_help_index'] = array(
    'description' => t('Stores search index correlations for advanced help topics.'),
    'fields' => array(
      'sid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('The primary key to give to the search engine for this topic.'),
        'no export' => TRUE,
      ),
      'module' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => t('The module that owns this topic.'),
      ),
      'topic' => array(
        'type' => 'varchar',
        'length' => '255',
        'default' => '',
        'not null' => TRUE,
        'description' => t('The topic id.'),
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => t('The language this search index relates to.'),
      ),
    ),
    'primary key' => array('sid'),
    'indexes' => array('language' => array('language')),
  );

  return $schema;
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal advanced_help.install source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.