ctools_custom_content.install 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * @file
  4. */
  5. /**
  6. * Schema for CTools custom content.
  7. */
  8. function ctools_custom_content_schema() {
  9. return ctools_custom_content_schema_1();
  10. }
  11. function ctools_custom_content_schema_1() {
  12. $schema = array();
  13. $schema['ctools_custom_content'] = array(
  14. 'description' => 'Contains exportable customized content for this site.',
  15. 'export' => array(
  16. 'identifier' => 'content',
  17. 'bulk export' => TRUE,
  18. 'primary key' => 'cid',
  19. 'api' => array(
  20. 'owner' => 'ctools_custom_content',
  21. 'api' => 'ctools_content',
  22. 'minimum_version' => 1,
  23. 'current_version' => 1,
  24. ),
  25. 'create callback' => 'ctools_content_type_new',
  26. ),
  27. 'fields' => array(
  28. 'cid' => array(
  29. 'type' => 'serial',
  30. 'description' => 'A database primary key to ensure uniqueness',
  31. 'not null' => TRUE,
  32. 'no export' => TRUE,
  33. ),
  34. 'name' => array(
  35. 'type' => 'varchar',
  36. 'length' => '255',
  37. 'description' => 'Unique ID for this content. Used to identify it programmatically.',
  38. ),
  39. 'admin_title' => array(
  40. 'type' => 'varchar',
  41. 'length' => '255',
  42. 'description' => 'Administrative title for this content.',
  43. ),
  44. 'admin_description' => array(
  45. 'type' => 'text',
  46. 'size' => 'big',
  47. 'description' => 'Administrative description for this content.',
  48. 'object default' => '',
  49. ),
  50. 'category' => array(
  51. 'type' => 'varchar',
  52. 'length' => '255',
  53. 'description' => 'Administrative category for this content.',
  54. ),
  55. 'settings' => array(
  56. 'type' => 'text',
  57. 'size' => 'big',
  58. 'description' => 'Serialized settings for the actual content to be used',
  59. 'serialize' => TRUE,
  60. 'object default' => array(),
  61. ),
  62. ),
  63. 'primary key' => array('cid'),
  64. );
  65. return $schema;
  66. }