Mercurial > defr > drupal > core
comparison modules/trigger/trigger.install @ 19:3edae6ecd6c6 6.9
Drupal 6.9
| author | Franck Deroche <franck@defr.org> | 
|---|---|
| date | Thu, 15 Jan 2009 10:15:56 +0100 | 
| parents | c1f4ac30525a | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 18:f5131a9cd9e5 | 19:3edae6ecd6c6 | 
|---|---|
| 1 <?php | 1 <?php | 
| 2 // $Id: trigger.install,v 1.5 2007/12/28 12:02:52 dries Exp $ | 2 // $Id: trigger.install,v 1.5.2.1 2009/01/06 15:46:38 goba Exp $ | 
| 3 | 3 | 
| 4 /** | 4 /** | 
| 5 * Implementation of hook_install(). | 5 * Implementation of hook_install(). | 
| 6 */ | 6 */ | 
| 7 function trigger_install() { | 7 function trigger_install() { | 
| 23 /** | 23 /** | 
| 24 * Implementation of hook_schema(). | 24 * Implementation of hook_schema(). | 
| 25 */ | 25 */ | 
| 26 function trigger_schema() { | 26 function trigger_schema() { | 
| 27 $schema['trigger_assignments'] = array( | 27 $schema['trigger_assignments'] = array( | 
| 28 'description' => t('Maps trigger to hook and operation assignments from trigger.module.'), | 28 'description' => 'Maps trigger to hook and operation assignments from trigger.module.', | 
| 29 'fields' => array( | 29 'fields' => array( | 
| 30 'hook' => array( | 30 'hook' => array( | 
| 31 'type' => 'varchar', | 31 'type' => 'varchar', | 
| 32 'length' => 32, | 32 'length' => 32, | 
| 33 'not null' => TRUE, | 33 'not null' => TRUE, | 
| 34 'default' => '', | 34 'default' => '', | 
| 35 'description' => t('Primary Key: The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.'), | 35 'description' => 'Primary Key: The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.', | 
| 36 ), | 36 ), | 
| 37 'op' => array( | 37 'op' => array( | 
| 38 'type' => 'varchar', | 38 'type' => 'varchar', | 
| 39 'length' => 32, | 39 'length' => 32, | 
| 40 'not null' => TRUE, | 40 'not null' => TRUE, | 
| 41 'default' => '', | 41 'default' => '', | 
| 42 'description' => t('Primary Key: The specific operation of the hook upon which an action is firing: for example, presave.'), | 42 'description' => 'Primary Key: The specific operation of the hook upon which an action is firing: for example, presave.', | 
| 43 ), | 43 ), | 
| 44 'aid' => array( | 44 'aid' => array( | 
| 45 'type' => 'varchar', | 45 'type' => 'varchar', | 
| 46 'length' => 255, | 46 'length' => 255, | 
| 47 'not null' => TRUE, | 47 'not null' => TRUE, | 
| 48 'default' => '', | 48 'default' => '', | 
| 49 'description' => t("Primary Key: Action's {actions}.aid."), | 49 'description' => "Primary Key: Action's {actions}.aid.", | 
| 50 ), | 50 ), | 
| 51 'weight' => array( | 51 'weight' => array( | 
| 52 'type' => 'int', | 52 'type' => 'int', | 
| 53 'not null' => TRUE, | 53 'not null' => TRUE, | 
| 54 'default' => 0, | 54 'default' => 0, | 
| 55 'description' => t('The weight of the trigger assignment in relation to other triggers.'), | 55 'description' => 'The weight of the trigger assignment in relation to other triggers.', | 
| 56 ), | 56 ), | 
| 57 ), | 57 ), | 
| 58 'primary key' => array('hook', 'op', 'aid'), | 58 'primary key' => array('hook', 'op', 'aid'), | 
| 59 ); | 59 ); | 
| 60 return $schema; | 60 return $schema; | 
