uuid.api.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. /**
  3. * @file
  4. * Hooks provided by the UUID module.
  5. */
  6. /**
  7. * Ensures all records have a UUID assigned to them.
  8. *
  9. * When called this hook should ensure all records it is responsible for
  10. * have a UUID and if not create one.
  11. *
  12. * @see entity_uuid_sync()
  13. */
  14. function hook_uuid_sync() {
  15. // Do what you need to do to generate missing UUIDs for you implementation.
  16. }
  17. /**
  18. * Transform entity properties from local IDs to UUIDs when they are loaded.
  19. */
  20. function hook_entity_uuid_load(&$entities, $entity_type) {
  21. }
  22. /**
  23. * Transform field values from local IDs to UUIDs when an entity is loaded.
  24. */
  25. function hook_field_uuid_load($entity_type, $entity, $field, $instance, $langcode, &$items) {
  26. }
  27. /**
  28. * Transform entity properties from UUIDs to local IDs before entity is saved.
  29. */
  30. function hook_entity_uuid_presave(&$entity, $entity_type) {
  31. }
  32. /**
  33. * Transform field values from UUIDs to local IDs before an entity is saved.
  34. */
  35. function hook_field_uuid_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
  36. }
  37. /**
  38. * Transform entity properties after an entity is saved.
  39. */
  40. function hook_entity_uuid_save($entity, $entity_type) {
  41. }
  42. /**
  43. * Let modules act when an entity is deleted.
  44. *
  45. * Generally hook_entity_delete() should be used instead of this hook.
  46. *
  47. * @see hook_entity_delete()
  48. */
  49. function hook_entity_uuid_delete($entity, $entity_type) {
  50. }
  51. /**
  52. * Modifies paths when they are being converted to UUID ones.
  53. */
  54. function hook_uuid_menu_path_to_uri_alter($path, &$uri) {
  55. }
  56. /**
  57. * Modifies paths when they are being converted from UUID ones.
  58. */
  59. function hook_uuid_menu_uri_to_path(&$path, $uri) {
  60. }
  61. /**
  62. * Allow modules to provide a list of default entities that will be imported.
  63. */
  64. function hook_uuid_default_entities() {
  65. }
  66. /**
  67. * Let other modules do things before default entities are created on rebuild.
  68. */
  69. function hook_uuid_entities_pre_rebuild($plan_name) {
  70. }
  71. /**
  72. * Let other modules do things after default entities are created on rebuild.
  73. */
  74. function hook_uuid_entities_post_rebuild($plan_name) {
  75. }
  76. /**
  77. * Let other modules do things before default entities are created on revert.
  78. */
  79. function hook_uuid_entities_pre_revert($plan_name) {
  80. }
  81. /**
  82. * Let other modules do things after default entities are created on revert.
  83. */
  84. function hook_uuid_entities_post_revert($plan_name) {
  85. }
  86. /**
  87. * Let other modules alter entities that are about to be exported.
  88. */
  89. function hook_uuid_entities_features_export_entity_alter(&$entity, $entity_type) {
  90. }
  91. /**
  92. * Let other modules alter fields on entities that are about to be exported.
  93. */
  94. function hook_uuid_entities_features_export_field_alter($entity_type, &$entity, $field, $instance, $langcode, &$items) {
  95. }
  96. /**
  97. * Alter UUID URI data after processing.
  98. */
  99. function hook_uuid_uri_data($data) {
  100. }
  101. /**
  102. * Alter entity URI before creating UUID URI.
  103. */
  104. function hook_uuid_id_uri_data($data) {
  105. }