ctools_custom_content.install 1.9 KB

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