corresponding_entity_references.install 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @file
  4. * Install file providing corresponding entity reference schema.
  5. */
  6. /**
  7. * Implements hook_schema().
  8. */
  9. function corresponding_entity_references_schema() {
  10. $schema['corresponding_entity_references'] = array(
  11. 'description' => t('Saves the content types and entity reference fields for which the corresponding entity reference is enabled'),
  12. 'fields' => array(
  13. 'entity_types_content_fields' => array('type' => 'varchar', 'length' => 200, 'not null' => TRUE, 'default' => ''),
  14. 'enabled' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
  15. ),
  16. 'primary key' => array('entity_types_content_fields'),
  17. 'export' => array(
  18. 'key' => 'entity_types_content_fields',
  19. 'primary key' => 'entity_types_content_fields',
  20. 'key name' => 'Corresponding entity reference',
  21. 'identifier' => 'cnr_obj',
  22. 'api' => array(
  23. 'api' => 'default_corresponding_entity_references_presets',
  24. 'owner' => 'corresponding_entity_references',
  25. 'minimum_version' => 1,
  26. 'current_version' => 1,
  27. ),
  28. ),
  29. );
  30. return $schema;
  31. }