Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / block_info.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/block_info.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/block_info.twig
new file mode 100644 (file)
index 0000000..6d160cd
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * Implements hook_block_info().
+ */
+function {{ machine_name }}_block_info() {
+  // This example comes from node.module.
+  $blocks['syndicate'] = array(
+    'info' => t('Syndicate'),
+    'cache' => DRUPAL_NO_CACHE
+  );
+
+  $blocks['recent'] = array(
+    'info' => t('Recent content'),
+    // DRUPAL_CACHE_PER_ROLE will be assumed.
+  );
+
+  return $blocks;
+}