Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / plugin_filter_TYPE_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/plugin_filter_TYPE_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/plugin_filter_TYPE_alter.twig
new file mode 100644 (file)
index 0000000..4f4ae35
--- /dev/null
@@ -0,0 +1,17 @@
+/**
+ * Implements hook_plugin_filter_TYPE_alter().
+ */
+function {{ machine_name }}_plugin_filter_TYPE_alter(array &$definitions, array $extra, $consumer) {
+  // Remove the "Help" block from the Block UI list.
+  if ($consumer == 'block_ui') {
+    unset($definitions['help_block']);
+  }
+
+  // If the theme is specified, remove the branding block from the Bartik theme.
+  if (isset($extra['theme']) && $extra['theme'] === 'bartik') {
+    unset($definitions['system_branding_block']);
+  }
+
+  // Remove the "Main page content" block from everywhere.
+  unset($definitions['system_main_block']);
+}