ctools_access_ruleset.install 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?php
  2. /**
  3. * @file
  4. */
  5. /**
  6. * Schema for customizable access rulesets.
  7. */
  8. function ctools_access_ruleset_schema() {
  9. return ctools_access_ruleset_schema_1();
  10. }
  11. function ctools_access_ruleset_schema_1() {
  12. $schema = array();
  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. return $schema;
  81. }