Skip to content
system.data_types.schema.yml 1.99 KiB
Newer Older
# Basic scalar data types from typed data.
boolean:
  label: 'Boolean'
  class: '\Drupal\Core\TypedData\Type\Boolean'
email:
  label: 'Email'
  class: '\Drupal\Core\TypedData\Type\Email'
integer:
  label: 'Integer'
  class: '\Drupal\Core\TypedData\Type\Integer'
float:
  label: 'Float'
  class: '\Drupal\Core\TypedData\Type\Float'
string:
  label: 'String'
  class: '\Drupal\Core\TypedData\Type\String'
uri:
  label: 'Uri'
  class: '\Drupal\Core\TypedData\Type\Uri'

# Basic data types for configuration.
undefined:
  label: 'Undefined'
  class: '\Drupal\Core\Config\Schema\Property'
mapping:
  label: Mapping
  class: '\Drupal\Core\Config\Schema\Mapping'
sequence:
  label: Sequence
  class: '\Drupal\Core\Config\Schema\Sequence'

# Default mapping for unknown types or types not found.
default:
  type: undefined
  label: 'Unknown'

# Simple extended data types:

# Human readable string that must be plain text and editable with a text field.
label:
  type: string
  label: 'Label'

# Internal Drupal path
path:
  type: string
  label: 'Path'

# Human readable string that can contain multiple lines of text or HTML.
text:
  type: string
  label: 'Text'

# Complex extended data types:

# Mail text with subject and body parts.
mail:
  type: mapping

# Filter with module and status.
filter:
  type: mapping
  label: 'Filter'
  mapping:
    module:
      type: string
      label: 'Module'
    status:
      type: boolean
      label: 'Enabled'

# Date format with name and pattern.
date_format:
  type: mapping
  label: 'Date Format'
  mapping:
    name:
      type: label
      label: 'Name'
    pattern:
      type: mapping
      label: 'Format string'
      mapping:
        php:
          type: label
          label: 'PHP date format'
        intl:
          type: label
          label: 'International'
    locked:
      type: boolean
      label: 'Locked'