Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / exit.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/exit.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/exit.twig
new file mode 100644 (file)
index 0000000..0839b20
--- /dev/null
@@ -0,0 +1,9 @@
+/**
+ * Implements hook_exit().
+ */
+function {{ machine_name }}_exit($destination = NULL) {
+  db_update('counter')
+    ->expression('hits', 'hits + 1')
+    ->condition('type', 1)
+    ->execute();
+}