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 / _field / schema.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/_field/schema.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/_field/schema.twig
new file mode 100644 (file)
index 0000000..e3612e6
--- /dev/null
@@ -0,0 +1,50 @@
+{% if storage_settings %}
+# Field storage.
+field.storage_settings.{{ field_id }}:
+  type: mapping
+  label: Example storage settings
+  mapping:
+    foo:
+      type: string
+      label: Foo
+{% endif %}
+{% if instance_settings %}
+# Field instance.
+field.field_settings.{{ field_id }}:
+  type: mapping
+  label: Example field settings
+  mapping:
+    bar:
+      type: string
+      label: Bar
+{% endif %}
+# Default value.
+field.value.{{ field_id }}:
+  type: mapping
+  label: Default value
+  mapping:
+{% for subfield in subfields %}
+    {{ subfield.machine_name }}:
+      type: {{ subfield.type }}
+      label: {{ subfield.name }}
+{% endfor %}
+{% if widget_settings %}
+# Field widget.
+field.widget.settings.{{ field_id }}:
+  type: mapping
+  label: Example widget settings
+  mapping:
+    foo:
+      type: string
+      label: Foo
+{% endif %}
+{% if formatter_settings %}
+# Field formatter.
+field.formatter.settings.{{ field_id }}_default:
+  type: mapping
+  label: Example formatter settings
+  mapping:
+    foo:
+      type: string
+      label: Foo
+{% endif %}
\ No newline at end of file