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