Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / verify_update_archive.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/verify_update_archive.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/verify_update_archive.twig
new file mode 100644 (file)
index 0000000..5c12456
--- /dev/null
@@ -0,0 +1,11 @@
+/**
+ * Implements hook_verify_update_archive().
+ */
+function {{ machine_name }}_verify_update_archive($project, $archive_file, $directory) {
+  $errors = [];
+  if (!file_exists($directory)) {
+    $errors[] = t('The %directory does not exist.', ['%directory' => $directory]);
+  }
+  // Add other checks on the archive integrity here.
+  return $errors;
+}