/[drupal]/contributions/modules/hooker/hooker.install
ViewVC logotype

Contents of /contributions/modules/hooker/hooker.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed May 7 02:42:36 2008 UTC (18 months, 3 weeks ago) by eaton
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Allows administrators to define hook implementations in the DB using a simple web interface. This module was written on a dare and should not be used under any circumstances.
1 <?php
2 // $Id$
3
4 function hooker_install() {
5 drupal_install_schema('hooker');
6 }
7
8 function hooker_schema() {
9 $schema['hooker'] = array(
10 'fields' => array(
11 'hook' => array(
12 'description' => 'The name of the hook to attach code to.',
13 'type' => 'varchar',
14 'length' => 255,
15 'not null' => TRUE),
16 'params' => array(
17 'description' => 'The list of function parameters for the hook.',
18 'type' => 'varchar',
19 'length' => 255,
20 'not null' => TRUE),
21 'code' => array(
22 'description' => 'The code to be executed when the hook is triggered.',
23 'type' => 'text',
24 'not null' => TRUE,
25 'size' => 'big'),
26 ),
27 'primary key' => array('hook'),
28 );
29 return $schema;
30 }
31
32 function hooker_uninstall() {
33 cache_clear_all('hooker:*', 'cache', TRUE);
34 drupal_uninstall_schema('hooker');
35 }

  ViewVC Help
Powered by ViewVC 1.1.2