Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / menu_get_item_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/menu_get_item_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/menu_get_item_alter.twig
new file mode 100644 (file)
index 0000000..d2c4925
--- /dev/null
@@ -0,0 +1,10 @@
+/**
+ * Implements hook_menu_get_item_alter().
+ */
+function {{ machine_name }}_menu_get_item_alter(&$router_item, $path, $original_map) {
+  // When retrieving the router item for the current path...
+  if ($path == $_GET['q']) {
+    // ...call a function that prepares something for this request.
+    mymodule_prepare_something();
+  }
+}