Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / image_default_styles.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d7/hook/image_default_styles.twig b/vendor/chi-teck/drupal-code-generator/templates/d7/hook/image_default_styles.twig
new file mode 100644 (file)
index 0000000..8c44724
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * Implements hook_image_default_styles().
+ */
+function {{ machine_name }}_image_default_styles() {
+  $styles = array();
+
+  $styles['mymodule_preview'] = array(
+    'label' => 'My module preview',
+    'effects' => array(
+      array(
+        'name' => 'image_scale',
+        'data' => array('width' => 400, 'height' => 400, 'upscale' => 1),
+        'weight' => 0,
+      ),
+      array(
+        'name' => 'image_desaturate',
+        'data' => array(),
+        'weight' => 1,
+      ),
+    ),
+  );
+
+  return $styles;
+}