Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / init.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/init.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/init.twig
new file mode 100644 (file)
index 0000000..98cbebc
--- /dev/null
@@ -0,0 +1,10 @@
+/**
+ * Implements hook_init().
+ */
+function {{ machine_name }}_init() {
+  // Since this file should only be loaded on the front page, it cannot be
+  // declared in the info file.
+  if (drupal_is_front_page()) {
+    drupal_add_css(drupal_get_path('module', 'foo') . '/foo.css');
+  }
+}