Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / hook / system_themes_page_alter.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/hook/system_themes_page_alter.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/hook/system_themes_page_alter.twig
new file mode 100644 (file)
index 0000000..dbc8392
--- /dev/null
@@ -0,0 +1,15 @@
+/**
+ * Implements hook_system_themes_page_alter().
+ */
+function {{ machine_name }}_system_themes_page_alter(&$theme_groups) {
+  foreach ($theme_groups as $state => &$group) {
+    foreach ($theme_groups[$state] as &$theme) {
+      // Add a foo link to each list of theme operations.
+      $theme->operations[] = [
+        'title' => t('Foo'),
+        'url' => Url::fromRoute('system.themes_page'),
+        'query' => ['theme' => $theme->getName()]
+      ];
+    }
+  }
+}