File tree 3 files changed +28
-4
lines changed
3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,16 @@ function apigee_api_catalog_update_8804(&$sandbox) {
115
115
}
116
116
117
117
/**
118
- * Delete API Doc entity definition if updating from 1.x .
118
+ * Deprecated step .
119
119
*/
120
120
function apigee_api_catalog_update_8805() {
121
- return \Drupal::service('apigee_api_catalog.updates')->update8805();
121
+ // return \Drupal::service('apigee_api_catalog.updates')->update8805();
122
122
}
123
+
124
+ /**
125
+ * Re-install if needed deprecated API Doc entity definition.
126
+ */
127
+ function apigee_api_catalog_update_8806() {
128
+ return \Drupal::service('apigee_api_catalog.updates')->update8806();
129
+ }
130
+
Original file line number Diff line number Diff line change 32
32
33
33
/**
34
34
* Access controller for the API Doc entity.
35
- *
35
+ *
36
36
* @deprecated in 2.x and is removed from 3.x. Use the node "apidoc" bundle instead.
37
37
* @see https://github.com/apigee/apigee-api-catalog-drupal/pull/84
38
38
*
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ public function update8802() {
175
175
}
176
176
177
177
/**
178
- * Recreate other fields added to the API Doc entity onto the API Doc node type.
178
+ * Recreate other fields added to API Doc entity onto the API Doc node type.
179
179
*
180
180
* @return string
181
181
* A message to display.
@@ -316,6 +316,22 @@ public function update8805() {
316
316
return 'The API Doc deprecated entity type has been removed from the system. ' ;
317
317
}
318
318
319
+ /**
320
+ * Recreate API Doc entity definition.
321
+ *
322
+ * Rollback update8805().
323
+ */
324
+ public function update8806 () {
325
+ \Drupal::entityTypeManager ()->clearCachedDefinitions ();
326
+ $ entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager ();
327
+ $ entity_definition_update_manager ->installEntityType (\Drupal::entityTypeManager ()->getDefinition ('apidoc ' ));
328
+
329
+ // Clear all caches.
330
+ drupal_flush_all_caches ();
331
+
332
+ return 'Installed API Doc deprecated entity type. ' ;
333
+ }
334
+
319
335
/**
320
336
* Get the field map from apidoc fields to node fields.
321
337
*
You can’t perform that action at this time.
0 commit comments