Projet

Général

Profil

Paste
Télécharger (2,3 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / ctools / ctools_access_ruleset / ctools_access_ruleset.install @ e4c061ad

1
<?php
2

    
3
/**
4
 * Schema for customizable access rulesets.
5
 */
6
function ctools_access_ruleset_schema() {
7
  return ctools_access_ruleset_schema_1();
8
}
9

    
10
function ctools_access_ruleset_schema_1() {
11
  $schema = array();
12

    
13
  $schema['ctools_access_ruleset'] = array(
14
    'description' => 'Contains exportable customized access rulesets.',
15
    'export' => array(
16
      'identifier' => 'ruleset',
17
      'bulk export' => TRUE,
18
      'primary key' => 'rsid',
19
      'api' => array(
20
        'owner' => 'ctools_access_ruleset',
21
        'api' => 'ctools_rulesets',
22
        'minimum_version' => 1,
23
        'current_version' => 1,
24
      ),
25
    ),
26
    'fields' => array(
27
      'rsid' => array(
28
        'type' => 'serial',
29
        'description' => 'A database primary key to ensure uniqueness',
30
        'not null' => TRUE,
31
        'no export' => TRUE,
32
      ),
33
      'name' => array(
34
        'type' => 'varchar',
35
        'length' => '255',
36
        'description' => 'Unique ID for this ruleset. Used to identify it programmatically.',
37
      ),
38
      'admin_title' => array(
39
        'type' => 'varchar',
40
        'length' => '255',
41
        'description' => 'Administrative title for this ruleset.',
42
      ),
43
      'admin_description' => array(
44
        'type' => 'text',
45
        'size' => 'big',
46
        'description' => 'Administrative description for this ruleset.',
47
        'object default' => '',
48
      ),
49
      'requiredcontexts' => array(
50
        'type' => 'text',
51
        'size' => 'big',
52
        'description' => 'Any required contexts for this ruleset.',
53
        'serialize' => TRUE,
54
        'object default' => array(),
55
      ),
56
      'contexts' => array(
57
        'type' => 'text',
58
        'size' => 'big',
59
        'description' => 'Any embedded contexts for this ruleset.',
60
        'serialize' => TRUE,
61
        'object default' => array(),
62
      ),
63
      'relationships' => array(
64
        'type' => 'text',
65
        'size' => 'big',
66
        'description' => 'Any relationships for this ruleset.',
67
        'serialize' => TRUE,
68
        'object default' => array(),
69
      ),
70
      'access' => array(
71
        'type' => 'text',
72
        'size' => 'big',
73
        'description' => 'The actual group of access plugins for this ruleset.',
74
        'serialize' => TRUE,
75
        'object default' => array(),
76
      ),
77
    ),
78
    'primary key' => array('rsid'),
79
  );
80

    
81
  return $schema;
82
}