ctools_access_ruleset.install 2.3 KB

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