Skip to content
core.data_types.schema.yml 16.3 KiB
Newer Older
# Base types provided by Drupal core.

# Read https://drupal.org/node/1905070 for more details about configuration
# schema, types and type resolution.

# Undefined type used by the system to assign to elements at any level where
# configuration schema is not defined. Using explicitly has the same effect as
# not defining schema, so there is no point in doing that.
undefined:
  label: 'Undefined'
  class: '\Drupal\Core\Config\Schema\Undefined'

# Explicit type to use when no data typing is possible. Instead of using this
# type, we strongly suggest you use configuration structures that can be
# described with other structural elements of schema, and describe your schema
# with those elements.
ignore:
  label: 'Ignore'
  class: '\Drupal\Core\Config\Schema\Ignore'

# Basic scalar data types from typed data.
boolean:
  label: 'Boolean'
  class: '\Drupal\Core\TypedData\Plugin\DataType\BooleanData'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Email'
  class: '\Drupal\Core\TypedData\Plugin\DataType\IntegerData'
  class: '\Drupal\Core\TypedData\Plugin\DataType\FloatData'
  class: '\Drupal\Core\TypedData\Plugin\DataType\StringData'
  class: '\Drupal\Core\TypedData\Plugin\DataType\Uri'
# Container data types for lists with known and unknown keys.
mapping:
  label: Mapping
  class: '\Drupal\Core\Config\Schema\Mapping'
  definition_class: '\Drupal\Core\TypedData\MapDataDefinition'
sequence:
  label: Sequence
  class: '\Drupal\Core\Config\Schema\Sequence'
  definition_class: '\Drupal\Core\TypedData\ListDataDefinition'

# 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'
# PHP Date format string that is translatable.
date_format:
  type: string
  translation context: 'PHP date format'
# HTML color value.
color_hex:
  type: string
  label: 'Color'

# 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:
      label: 'ID'
    provider:
      type: string
      label: 'Provider'
      label: 'Status'
    weight:
      type: integer
      label: 'Weight'
    settings:
      type: filter_settings.[%parent.id]

# System action configuration base.
action_configuration_default:
  type: sequence
  label: 'Action configuration'
  sequence:
    favicon:
      type: mapping
      label: 'Shortcut icon settings'
      mapping:
        mimetype:
          type: string
          label: 'MIME type'
        path:
          type: string
          label: 'Path'
        url:
          type: string
          label: 'URL'
        use_default:
          type: boolean
          label: 'Use the default shortcut icon supplied by the theme'
    features:
      type: mapping
      mapping:
        comment_user_picture:
          type: boolean
          label: 'User pictures in comments'
        comment_user_verification:
          type: boolean
          label: 'User verification status in comments'
        favicon:
          type: boolean
          label: 'Shortcut icon'
        logo:
          type: boolean
          label: 'Logo'
        name:
          type: boolean
          label: 'Site name'
        node_user_picture:
          type: boolean
          label: 'User pictures in posts'
        slogan:
          type: boolean
          label: 'Site slogan'
    logo:
      type: mapping
      mapping:
        path:
          type: string
          label: 'Logo path'
        url:
          type: uri
          label: 'URL'
        use_default:
          type: boolean
          label: 'Use default'
    third_party_settings:
      type: sequence
      label: 'Third party settings'
      sequence:
        type: theme_settings.third_party.[%key]

theme_breakpoints_default:
  type: sequence
  sequence:

views_field_bulk_form:
  type: views_field
  label: 'Bulk operation'
  mapping:
    action_title:
      type: label
      label: 'Action title'
    include_exclude:
      type: string
      label: 'Available actions'
    selected_actions:
      type: sequence
      label: 'Available actions'
      sequence:

# Array of routes with route_name and route_params keys.
route:
  type: mapping
  label: 'Route'
  mapping:
    route_name:
      label: 'Route Name'
    route_params:
      type: sequence
      label: 'Route Params'
      sequence:
      label: 'Configuration entity dependencies'
      sequence:
    content:
      type: sequence
      label: 'Content entity dependencies'
    module:
      type: sequence
      label: 'Module dependencies'
      sequence:
    theme:
      type: sequence
      label: 'Theme dependencies'
      sequence:
config_dependencies:
  type: config_dependencies_base
  label: 'Configuration dependencies'
  mapping:
    enforced:
      type: config_dependencies_base
      label: 'Enforced configuration dependencies'

config_entity:
  type: mapping
  mapping:
    uuid:
      type: string
      label: 'UUID'
    langcode:
      type: string
      label: 'Default language'
    status:
      type: boolean
      label: 'Status'
    dependencies:
      type: config_dependencies
      label: 'Dependencies'
    third_party_settings:
      type: sequence
      label: 'Third party settings'
      sequence:
        type: '[%parent.%parent.%type].third_party.[%key]'

block_settings:
  type: mapping
  label: 'Block settings'
  mapping:
    id:
      type: string
      label: 'ID'
    label:
      type: label
      label: 'Description'
    label_display:
      type: string
      label: 'Display title'
    cache:
      type: mapping
      label: 'Cache settings'
      mapping:
        max_age:
          type: integer
          label: 'Maximum age'
        contexts:
          type: sequence
          label: 'Vary by context'
          sequence:
    status:
      type: boolean
      label: 'Status'
    info:
      type: label
      label: 'Admin info'
    view_mode:
      type: string
      label: 'View mode'
    provider:
      type: string
      label: 'Provider'

condition.plugin:
  type: mapping
  label: 'Condition'
  mapping:
    id:
      type: string
      label: 'ID'
    negate:
      type: boolean
      label: 'Negate'
    uuid:
      type: string
      label: 'UUID'
    context_mapping:
      type: sequence
      label: 'Context assignments'
      sequence:

display_variant.plugin:
  type: mapping
  label: 'Display variant'
  mapping:
    id:
      type: string
      label: 'ID'
    label:
      type: label
      label: 'Label'
    weight:
      type: integer
      label: 'Weight'
    uuid:
      type: string
      label: 'UUID'

base_entity_reference_field_settings:
  type: mapping
  mapping:
    target_type:
      type: string
      label: 'Type of item to reference'
    target_bundle:
      type: string
      label: 'Bundle of item to reference'

field_config_base:
  type: config_entity
  mapping:
    id:
      type: string
      label: 'ID'
    field_name:
      type: string
      label: 'Field name'
    entity_type:
      type: string
      label: 'Entity type'
    bundle:
      type: string
      label: 'Bundle'
    label:
      type: label
      label: 'Label'
    description:
      type: text
      label: 'Help text'
    required:
      type: boolean
      label: 'Required field'
    translatable:
      type: boolean
      label: 'Translatable'
    default_value:
      type: sequence
      label: 'Default values'
      sequence:
        type: field.value.[%parent.%parent.field_type]
        label: 'Default value'
      type: field.field_settings.[%parent.field_type]
    field_type:
      type: string
      label: 'Field type'

core.base_field_override.*.*.*:
  type: field_config_base
  label: 'Base field bundle override'
core.date_format.*:
  type: config_entity
  label: 'Date format'
  mapping:
    id:
      type: string
      label: 'ID'
    label:
      type: label
      label: 'Label'
    locked:
      type: boolean
      label: 'Locked'
    pattern:
      type: date_format
      label: 'PHP date format'
    langcode:
      type: string
      label: 'Default language'

# Generic field settings schemas.

field.storage_settings.*:
  type: mapping
  label: 'Settings'

field.field_settings.*:
  type: mapping
  label: 'Settings'

field.value.*:
  type: mapping
  label: 'Default value'

# Schema for the configuration of the String field type.

  type: mapping
  label: 'String settings'
  mapping:
    max_length:
      type: integer
      label: 'Maximum length'
    case_sensitive:
      type: boolean
      label: 'Case sensitive'
field.field_settings.string:
  type: mapping
# Schema for the configuration of the  String (long) field type.

field.storage_settings.string_long:
  mapping:
    case_sensitive:
      type: boolean
      label: 'Case sensitive'
field.field_settings.string_long:
field.value.string_long:
  type: mapping
  type: mapping
  label: 'URI settings'
  mapping:
    max_length:
      type: integer
      label: 'Maximum length'
    case_sensitive:
      type: boolean
      label: 'Case sensitive'
field.field_settings.uri:
  type: mapping

# Schema for the configuration of the Created field type.

field.storage_settings.created:
  type: mapping
field.field_settings.created:
  type: mapping

# Schema for the configuration of the Changed field type.

field.storage_settings.changed:
  type: mapping
field.field_settings.changed:
  type: mapping

# Schema for the configuration of the Entity reference field type.

field.storage_settings.entity_reference:
  label: 'Entity reference field storage settings'
  mapping:
    target_type:
      type: string
      label: 'Type of item to reference'

field.field_settings.entity_reference:
  label: 'Entity reference field settings'
  mapping:
    handler:
      type: string
      label: 'Reference method'
    handler_settings:
      type: entity_reference_selection.[%parent.handler]
      label: 'Entity reference selection plugin settings'
field.value.entity_reference:
  type: mapping
  mapping:
    target_id:
      type: string
      label: 'Value'
    target_uuid:
      type: string
      label: 'Target UUID'

# Schema for the configuration of the Boolean field type.
  mapping:
    on_label:
      type: string
      label: 'On label'
    off_label:
      type: string
      label: 'Off label'

field.value.boolean:
  type: mapping
  mapping:
    value:
      type: integer
      label: 'Value'
# Schema for the configuration of the Email field type.
field.storage_settings.email:
  type: mapping
field.field_settings.email:
  type: mapping
# Schema for the configuration of the Integer field type.
  mapping:
    unsigned:
      type: boolean
      label: 'Unsigned'
    size:
      type: string
      label: 'Database storage size'
  type: mapping
  label: 'Integer'
  mapping:
    min:
      type: integer
      label: 'Minimum'
    max:
      type: integer
      label: 'Maximum'
    prefix:
      type: string
      label: 'Prefix'
    suffix:
      type: string
      label: 'Suffix'

# Schema for the configuration of the Decimal field type.

  type: mapping
  label: 'Decimal settings'
  mapping:
    precision:
      type: integer
      label: 'Precision'
    scale:
      type: integer
      label: 'Scale'

  mapping:
    min:
      type: float
      label: 'Minimum'
    max:
      type: float
      label: 'Maximum'
    prefix:
      type: string
      label: 'Prefix'
    suffix:
      type: string
      label: 'Suffix'

# Schema for the configuration of the Float field type.

field.storage_settings.float:
  type: mapping
  mapping:
    min:
      type: float
      label: 'Minimum'
    max:
      type: float
      label: 'Maximum'
    prefix:
      type: string
      label: 'Prefix'
    suffix:
      type: string
      label: 'Suffix'


# Text with a text format.
text_format:
  type: mapping
  label: 'Text with text format'
  # We declare the entire mapping of text and text format as translatable. This
  # causes the entire mapping to be saved to the language overrides of the
  # configuration. Storing only the (to be formatted) text could result in
  # security problems in case the text format of the source text is changed.
  translatable: true
  mapping:
    value:
      type: text
      label: 'Text'
      # Mark the actual text as translatable (in addition to the entire mapping
      # being marked as translatable) so that shipped configuration with
      # formatted text can participate in the string translation system.
      translatable: true
    format:
      type: string
      label: 'Text format'
      # The text format should not be translated as part of the string
      # translation system, so this is not marked as translatable.

# Schema for the configuration of the Entity reference selection plugins.

entity_reference_selection:
  type: mapping
  label: 'Entity reference selection plugin configuration'
  mapping:
    target_bundles:
      type: sequence
      label: 'types'
      sequence:
        type: string
        label: 'Type'
    sort:
      type: mapping
      label: 'Sort settings'
      mapping:
        field:
          type: string
          label: 'Sort by'
        direction:
          type: string
          label: 'Sort direction'
    auto_create:
      type: boolean
      label: 'Create referenced entities if they don''t already exist'

entity_reference_selection.*:
  type: entity_reference_selection