triples_field-1.0.x-dev/config/schema/triples_field.schema.yml

config/schema/triples_field.schema.yml
# Storage schema.
triples_field.settings:
  type: config_object
  label: 'Triple subfield'
  mapping:
    fields:
      type: sequence
      label: Fields list
      sequence:
        first:
          type: string
          label: First subfield
        second:
          type: string
          label: Second subfield
        third:
          type: string
          label: Third subfield

field.storage_settings.triples_field:
  type: mapping
  label: Storage subfield settings
  mapping:
    storage:
      type: mapping
      label: Triple Field storage settings
      mapping:
        first:
          type: field_storage_subfield_settings
        second:
          type: field_storage_subfield_settings
        third:
          type: field_storage_subfield_settings

field_storage_subfield_settings:
  type: mapping
  label: Storage subfield settings
  mapping:
    type:
      type: string
      label: Type
    maxlength:
      type: integer
      label: Max length
    precision:
      type: integer
      label: Precision
    scale:
      type: integer
      label: Scale
    datetime_type:
      type: string
      label: Date type

# Instance schema.
field.field_settings.triples_field:
  type: mapping
  label: Triple Field settings
  mapping:
    first:
      type: triples_field_subfield_settings
    second:
      type: triples_field_subfield_settings
    third:
      type: triples_field_subfield_settings

triples_field_subfield_settings:
  type: mapping
  label: Subfield settings
  mapping:
    label:
      type: label
      label: Label
    list:
      type: boolean
      label: Limit allowed values
    allowed_values:
      type: sequence
      label: Allowed values
      sequence:
        type: mapping
        mapping:
          label:
            type: label
            label: Label
          value:
            # This actually can be some other scalar type.
            type: string
            label: Value
    max:
      type: integer
      label: Maximal value
    min:
      type: integer
      label: Minimal value
    required:
      type: boolean
      label: Required
    on_label:
      type: string
      label: On label
    off_label:
      type: string
      label: Off label

# Widget schema.
field.widget.settings.triples_field:
  type: mapping
  label: triples Field widget settings
  mapping:
    first:
      type: field_widget_subfield_settings
    second:
      type: field_widget_subfield_settings
    third:
      type: field_widget_subfield_settings
    inline:
      type: boolean
      label: Display as inline element

field_widget_subfield_settings:
  type: mapping
  label: Widget subfield settings
  mapping:
    type:
      type: string
      label: Type
    label_display:
      type: string
      label: Label display
    size:
      type: integer
      label: Size
    placeholder:
      type: string
      label: Placeholder
    label:
      type: string
      label: Label
    cols:
      type: integer
      label: Cols
    rows:
      type: integer
      label: Rows

# Formatters schema.
field.formatter.settings.triples_field_unformatted_list:
  type: field_formatter_settings

field.formatter.settings.triples_field_html_list:
  type: field_formatter_settings
  mapping:
    list_type:
      type: string
      label: List type

field.formatter.settings.triples_field_details:
  type: field_formatter_settings
  mapping:
    open:
      type: boolean
      label: Open

field.formatter.settings.triples_field_table:
  type: field_formatter_settings
  mapping:
    number_column:
      type: boolean
      label: Number column
    number_column_label:
      type: string
      label: Number column label
    first_column_label:
      type: string
      label: First column label
    second_column_label:
      type: string
      label: Second column label
    third_column_label:
      type: string
      label: Third column label

field_formatter_settings:
  type: mapping
  label: Formatter settings
  mapping:
    first:
      type: field_formatter_subfield_settings
    second:
      type: field_formatter_subfield_settings
    third:
      type: field_formatter_subfield_settings
    inline:
      type: boolean
      label: Inline

field_formatter_subfield_settings:
  type: mapping
  label: Formatter subfield settings
  mapping:
    format_type:
      type: string
      label: Format type
    link:
      type: boolean
      label: Link
    hidden:
      type: boolean
      label: Hidden
    show_label:
      type: boolean
      label: Show label
    key:
      type: boolean
      label: Key
    decimal_separator:
      type: string
      label: Decimal marker
    thousand_separator:
      type: string
      label: Thousand marker
    scale:
      type: integer
      label: Scale

# Default value schema.
field.value.triples_field:
  type: mapping
  label: Default value
  mapping:
    # Treat these values as strings. The actual subfield types depend on field
    # storage configuration.
    first:
      type: string
      label: First subfield
    second:
      type: string
      label: Second subfield
    third:
      type: string
      label: Third subfield

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc