source: sipes/cord/modules/trigger/trigger.install @ 8a8efa8

stableversion-3.0
Last change on this file since 8a8efa8 was b354002, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agrego el directorio del cord

  • Propiedad mode establecida a 100755
File size: 1.6 KB
Línea 
1<?php
2
3/**
4 * Implementation of hook_install().
5 */
6function trigger_install() {
7  // Create tables.
8  drupal_install_schema('trigger');
9
10  // Do initial synchronization of actions in code and the database.
11  actions_synchronize(actions_list());
12}
13
14/**
15 * Implementation of hook_uninstall().
16 */
17function trigger_uninstall() {
18  // Remove tables.
19  drupal_uninstall_schema('trigger');
20}
21
22/**
23 * Implementation of hook_schema().
24 */
25function trigger_schema() {
26  $schema['trigger_assignments'] = array(
27    'description' => 'Maps trigger to hook and operation assignments from trigger.module.',
28    'fields' => array(
29      'hook' => array(
30        'type' => 'varchar',
31        'length' => 32,
32        'not null' => TRUE,
33        'default' => '',
34        'description' => 'Primary Key: The name of the internal Drupal hook upon which an action is firing; for example, nodeapi.',
35      ),
36      'op' => array(
37        'type' => 'varchar',
38        'length' => 32,
39        'not null' => TRUE,
40        'default' => '',
41        'description' => 'Primary Key: The specific operation of the hook upon which an action is firing: for example, presave.',
42      ),
43      'aid' => array(
44        'type' => 'varchar',
45        'length' => 255,
46        'not null' => TRUE,
47        'default' => '',
48        'description' => "Primary Key: Action's {actions}.aid.",
49      ),
50      'weight' => array(
51        'type' => 'int',
52        'not null' => TRUE,
53        'default' => 0,
54        'description' => 'The weight of the trigger assignment in relation to other triggers.',
55      ),
56    ),
57    'primary key' => array('hook', 'op', 'aid'),
58  );
59  return $schema;
60}
61
62
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.