Projet

Général

Profil

Paste
Télécharger (3,5 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / uuid / uuid.api.php @ a5572547

1 85ad3d82 Assos Assos
<?php
2
3
/**
4
 * @file
5
 * Hooks provided by the UUID module.
6
 */
7
8
/**
9
 * Defines one or more UUID generators exposed by a module.
10
 *
11
 * @return
12
 *   An associative array with the key being the machine name for the
13
 *   implementation and the values being an array with the following keys:
14
 *     - title: The human readable name for the generator.
15
 *     - callback: The function to be called for generating the UUID.
16
 *
17
 * @see uuid_get_info()
18
 */
19
function hook_uuid_info() {
20
  $generators = array();
21
  $generators['my_module'] = array(
22
    'title' => t('My module UUID generator'),
23
    'callback' => 'my_module_generate_uuid',
24
  );
25
  return $generators;
26
}
27
28
/**
29
 * Ensures all records have a UUID assigned to them.
30
 *
31
 * When called this hook should ensure all records it is responsible for
32
 * have a UUID and if not create one.
33
 *
34
 * @see entity_uuid_sync()
35
 */
36
function hook_uuid_sync() {
37
  // Do what you need to do to generate missing UUIDs for you implementation.
38
}
39
40
/**
41
 * Let modules transform their properties with local IDs to UUIDs when an
42
 * entity is loaded.
43
 */
44
function hook_entity_uuid_load(&$entities, $entity_type) {
45
46
}
47
48
/**
49
 * Let modules transform their fields with local IDs to UUIDs when an entity
50
 * is loaded.
51
 */
52
function hook_field_uuid_load($entity_type, $entity, $field, $instance, $langcode, &$items) {
53
54
}
55
56
/**
57
 * Let modules transform their properties with UUIDs to local IDs when an
58
 * entity is saved.
59
 */
60
function hook_entity_uuid_presave(&$entity, $entity_type) {
61
62
}
63
64
/**
65
 * Let modules transform their fields with UUIDs to local IDs when an entity
66
 * is saved.
67
 */
68
function hook_field_uuid_presave($entity_type, $entity, $field, $instance, $langcode, &$items) {
69
70
}
71
72
/**
73
 * Let modules transform their properties when an entity is saved.
74
 */
75
function hook_entity_uuid_save($entity, $entity_type) {
76
77
}
78
79
/**
80
 * Let modules act when an entity is deleted.
81
 */
82
function hook_entity_uuid_delete($entity, $entity_type) {
83
84
}
85
86
/**
87
 * Let modules modify paths when they are being converted to UUID ones.
88
 */
89
function hook_uuid_menu_path_to_uri_alter($path, &$uri) {
90
91
}
92
93
/**
94
 * Let modules modify paths when they are being converted from UUID ones.
95
 */
96
function hook_uuid_menu_uri_to_path(&$path, $uri) {
97
98
}
99
100
/**
101
 * Allow modules to provide a list of default entities that will be imported.
102
 */
103
function hook_uuid_default_entities() {
104
105
}
106
107
/**
108
 * Let other modules do things before default entities are created on rebuild.
109
 */
110
function hook_uuid_entities_pre_rebuild($plan_name) {
111
112
}
113
114
/**
115
 * Let other modules do things after default entities are created on rebuild.
116
 */
117
function hook_uuid_entities_post_rebuild($plan_name) {
118
119
}
120
121
/**
122
 * Let other modules do things before default entities are created on revert.
123
 */
124
function hook_uuid_entities_pre_rebuild($plan_name) {
125
126
}
127
128
/**
129
 * Let other modules do things after default entities are created on revert.
130
 */
131
function hook_uuid_entities_post_rebuild($plan_name) {
132
133
}
134
135
/**
136
 * Let other modules alter entities that are about to be exported.
137
 */
138
function hook_uuid_entities_features_export_entity_alter(&$entity, $entity_type) {
139
140
}
141
142
/**
143
 * Let other modules alter fields on entities that are about to be exported.
144
 */
145
function hook_uuid_entities_features_export_field_alter($entity_type, &$entity, $field, $instance, $langcode, &$items) {
146
147
}
148
149
/**
150
 * Alter UUID URI data after processing.
151
 */
152
function hook_uuid_uri_data($data) {
153
}
154
155
/**
156
 * Alter UUID URI data after processing.
157
 */
158
function hook_uuid_uri_data($data) {
159
}
160
161
/**
162
 * Alter entity URI before creating UUID URI.
163
 */
164
function hook_uuid_id_uri_data($data) {
165
}