Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / block_view_MODULE_DELTA_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/block_view_MODULE_DELTA_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/block_view_MODULE_DELTA_alter.twig
new file mode 100644 (file)
index 0000000..2223858
--- /dev/null
@@ -0,0 +1,12 @@
+/**
+ * Implements hook_block_view_MODULE_DELTA_alter().
+ */
+function {{ machine_name }}_block_view_MODULE_DELTA_alter(&$data, $block) {
+  // This code will only run for a specific block. For example, if MODULE_DELTA
+  // in the function definition above is set to "mymodule_somedelta", the code
+  // will only run on the "somedelta" block provided by the "mymodule" module.
+
+  // Change the title of the "somedelta" block provided by the "mymodule"
+  // module.
+  $data['subject'] = t('New title of the block');
+}