Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / update_dependencies.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/update_dependencies.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/update_dependencies.twig
new file mode 100644 (file)
index 0000000..009d4b2
--- /dev/null
@@ -0,0 +1,22 @@
+/**
+ * Implements hook_update_dependencies().
+ */
+function {{ machine_name }}_update_dependencies() {
+  // Indicate that the mymodule_update_7000() function provided by this module
+  // must run after the another_module_update_7002() function provided by the
+  // 'another_module' module.
+  $dependencies['mymodule'][7000] = array(
+    'another_module' => 7002,
+  );
+  // Indicate that the mymodule_update_7001() function provided by this module
+  // must run before the yet_another_module_update_7004() function provided by
+  // the 'yet_another_module' module. (Note that declaring dependencies in this
+  // direction should be done only in rare situations, since it can lead to the
+  // following problem: If a site has already run the yet_another_module
+  // module's database updates before it updates its codebase to pick up the
+  // newest mymodule code, then the dependency declared here will be ignored.)
+  $dependencies['yet_another_module'][7004] = array(
+    'mymodule' => 7001,
+  );
+  return $dependencies;
+}