autosave.install in Autosave 7
Same filename and directory in other branches
Install, update and uninstall functions for the autosave module.
File
autosave.installView source
<?php
// $Id: autosave.install,v 1.3 2009/10/27 07:39:05 ptalindstrom Exp $
/**
* @file
* Install, update and uninstall functions for the autosave module.
*
*/
/**
* Implements hook_enable().
().
*/
function autosave_enable() {
drupal_set_message(t('Autosave module successfully installed. Please review the <a href="@settings">configuration settings</a>.', array(
'@settings' => url('admin/config/autosave'),
)));
}
/**
* Implements hook_install().
().
*/
function autosave_install() {
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_install_schema('autosave')
}
/**
* Implements hook_uninstall().
().
*/
function autosave_uninstall() {
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_uninstall_schema('autosave')
}
/**
* Implements hook_schema()
().
*/
function autosave_schema() {
return array(
'autosaved_forms' => array(
'description' => "Table to save forms in the database",
'fields' => array(
'form_id' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'path' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'uid' => array(
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'type' => 'int',
'length' => 11,
'not null' => TRUE,
'default' => 0,
),
'serialized' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
),
),
'primary key' => array(
'form_id',
'path',
'uid',
),
),
);
}
Functions
Name![]() |
Description |
---|---|
autosave_enable | Implements hook_enable(). (). |
autosave_install | Implements hook_install(). (). |
autosave_schema | Implements hook_schema() (). |
autosave_uninstall | Implements hook_uninstall(). (). |