summaryrefslogtreecommitdiff
path: root/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.install
blob: 3f0087725a01f236b0132aa6092966e7d002825d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php

/**
 * Schema for customizable access rulesets.
 */
function ctools_access_ruleset_schema() {
  return ctools_access_ruleset_schema_1();
}

function ctools_access_ruleset_schema_1() {
  $schema = array();

  $schema['ctools_access_ruleset'] = array(
    'description' => 'Contains exportable customized access rulesets.',
    'export' => array(
      'identifier' => 'ruleset',
      'bulk export' => TRUE,
      'primary key' => 'rsid',
      'api' => array(
        'owner' => 'ctools_access_ruleset',
        'api' => 'ctools_rulesets',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'rsid' => array(
        'type' => 'serial',
        'description' => 'A database primary key to ensure uniqueness',
        'not null' => TRUE,
        'no export' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Unique ID for this ruleset. Used to identify it programmatically.',
      ),
      'admin_title' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Administrative title for this ruleset.',
      ),
      'admin_description' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Administrative description for this ruleset.',
        'object default' => '',
      ),
      'requiredcontexts' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Any required contexts for this ruleset.',
        'serialize' => TRUE,
        'object default' => array(),
      ),
      'contexts' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Any embedded contexts for this ruleset.',
        'serialize' => TRUE,
        'object default' => array(),
      ),
      'relationships' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Any relationships for this ruleset.',
        'serialize' => TRUE,
        'object default' => array(),
      ),
      'access' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'The actual group of access plugins for this ruleset.',
        'serialize' => TRUE,
        'object default' => array(),
      ),
    ),
    'primary key' => array('rsid'),
  );

  return $schema;
}