view vendor/chi-teck/drupal-code-generator/templates/d8/_field/schema.twig @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
line wrap: on
line source
{% 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 %}