core.data_types.schema.yml

Same filename and directory in other branches
  1. 10 core/config/schema/core.data_types.schema.yml
  2. 9 core/config/schema/core.data_types.schema.yml
  3. 8.9.x core/config/schema/core.data_types.schema.yml
  4. main core/config/schema/core.data_types.schema.yml
core/config/schema/core.data_types.schema.yml

File

core/config/schema/core.data_types.schema.yml

View source
  1. # Base types provided by Drupal core.
  2. # Read https://www.drupal.org/node/1905070 for more details about configuration
  3. # schema, types and type resolution.
  4. # Undefined type used by the system to assign to elements at any level where
  5. # configuration schema is not defined. Using explicitly has the same effect as
  6. # not defining schema, so there is no point in doing that.
  7. undefined:
  8. label: 'Undefined'
  9. class: '\Drupal\Core\Config\Schema\Undefined'
  10. # Explicit type to use when no data typing is possible. Instead of using this
  11. # type, we strongly suggest you use configuration structures that can be
  12. # described with other structural elements of schema, and describe your schema
  13. # with those elements.
  14. ignore:
  15. label: 'Ignore'
  16. class: '\Drupal\Core\Config\Schema\Ignore'
  17. # Basic scalar data types from typed data.
  18. boolean:
  19. label: 'Boolean'
  20. class: '\Drupal\Core\TypedData\Plugin\DataType\BooleanData'
  21. enum:
  22. label: 'Enum'
  23. class: '\Drupal\Core\TypedData\Plugin\DataType\Enum'
  24. email:
  25. label: 'Email'
  26. class: '\Drupal\Core\TypedData\Plugin\DataType\Email'
  27. constraints:
  28. Email:
  29. message: "%value is not a valid email address."
  30. integer:
  31. label: 'Integer'
  32. class: '\Drupal\Core\TypedData\Plugin\DataType\IntegerData'
  33. timestamp:
  34. label: 'Timestamp'
  35. class: '\Drupal\Core\TypedData\Plugin\DataType\Timestamp'
  36. float:
  37. label: 'Float'
  38. class: '\Drupal\Core\TypedData\Plugin\DataType\FloatData'
  39. string:
  40. label: 'String'
  41. class: '\Drupal\Core\TypedData\Plugin\DataType\StringData'
  42. uri:
  43. label: 'Uri'
  44. class: '\Drupal\Core\TypedData\Plugin\DataType\Uri'
  45. # Container data types for lists with known and unknown keys.
  46. mapping:
  47. label: Mapping
  48. class: '\Drupal\Core\Config\Schema\Mapping'
  49. definition_class: '\Drupal\Core\TypedData\MapDataDefinition'
  50. mapping: {}
  51. constraints:
  52. # By default, allow the explicitly listed mapping keys, and require their
  53. # presence unless `requiredKey: false` is specified.
  54. ValidKeys:
  55. allowedKeys: '<infer>'
  56. sequence:
  57. label: Sequence
  58. class: '\Drupal\Core\Config\Schema\Sequence'
  59. definition_class: '\Drupal\Core\Config\Schema\SequenceDataDefinition'
  60. # Simple extended data types:
  61. # Human readable string that must be plain text and editable with a text field.
  62. label:
  63. type: string
  64. label: 'Optional label'
  65. translatable: true
  66. constraints:
  67. Regex:
  68. # Forbid any kind of control character.
  69. # @see https://stackoverflow.com/a/66587087
  70. pattern: '/([^\PC])/u'
  71. match: false
  72. message: 'Labels are not allowed to span multiple lines or contain control characters.'
  73. required_label:
  74. type: label
  75. label: 'Label'
  76. constraints:
  77. NotBlank: {}
  78. # String containing plural variants, separated by EXT.
  79. plural_label:
  80. type: label
  81. label: 'Plural variants'
  82. constraints:
  83. Regex:
  84. # Normally, labels cannot contain invisible control characters. In this particular
  85. # case, an invisible character (ASCII 3, 0x03) is used to encode translation
  86. # information, so carve out an exception for that only.
  87. # @see \Drupal\views\Plugin\views\field\NumericField
  88. pattern: '/([^\PC\x03])/u'
  89. match: false
  90. message: 'Labels are not allowed to span multiple lines or contain control characters.'
  91. # Internal Drupal path
  92. path:
  93. type: string
  94. label: 'Path'
  95. # Human readable string that can contain multiple lines of text or HTML.
  96. text:
  97. type: string
  98. label: 'Text'
  99. translatable: true
  100. constraints:
  101. Regex:
  102. # Disallow all control characters except for tabs (ASCII 9, 0x09) as well
  103. # as carriage returns (ASCII 13, 0x0D) and line feeds (ASCII 10, 0x0A),
  104. # which are used for line endings:
  105. # - Windows: `\r\n`
  106. # - old macOS: `\r`
  107. # - *nix: `\n`
  108. # @see https://stackoverflow.com/a/66587087
  109. pattern: '/([^\PC\x09\x0a\x0d])/u'
  110. match: false
  111. message: 'Text is not allowed to contain control characters, only visible characters.'
  112. # A UUID.
  113. uuid:
  114. type: string
  115. label: 'UUID'
  116. constraints:
  117. Uuid: {}
  118. # PHP Date format string that is translatable.
  119. date_format:
  120. type: string
  121. label: 'Date format'
  122. translatable: true
  123. translation context: 'PHP date format'
  124. # HTML color value.
  125. color_hex:
  126. type: string
  127. label: 'Color'
  128. constraints:
  129. # TRICKY: this cannot reuse the Color::validateHex() logic because:
  130. # 1. Color::validateHex() would not allow NULL, but this constraint does.
  131. # (Anything in config can be marked optional, so NULL must never trigger
  132. # a validation error) Color::validateHex() does not allow this.
  133. # 2. The Regex constraint is something that an external tool (no matter
  134. # whether that's something generating/validating Drupal config or a
  135. # JSON:API/REST/GraphQL/… client) to also correctly validate this.
  136. Regex:
  137. # Regex copied from Color::validateHex()
  138. pattern: '/^[#]?([0-9a-fA-F]{3}){1,2}$/'
  139. message: "%value is not a valid hexadecimal color."
  140. # Machine-readable identifier that can only contain certain characters.
  141. machine_name:
  142. type: string
  143. label: 'Machine name'
  144. constraints:
  145. Regex:
  146. pattern: '/^[a-z0-9_]+$/'
  147. message: "The %value machine name is not valid."
  148. Length:
  149. # @see \Drupal\Core\Config\Entity\ConfigEntityStorage::MAX_ID_LENGTH
  150. max: 166
  151. # A language identifier.
  152. langcode:
  153. type: string
  154. label: 'Language code'
  155. constraints:
  156. NotNull: []
  157. Choice:
  158. callback: 'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllValidLangcodes'
  159. # A number of bytes; either a plain number or with a size indication such as "MB".
  160. # @see \Drupal\Component\Utility\Bytes
  161. bytes:
  162. type: string
  163. label: 'Bytes'
  164. constraints:
  165. Callback:
  166. callback: ['\Drupal\Component\Utility\Bytes', 'validateConstraint']
  167. weight:
  168. type: integer
  169. label: 'Weight'
  170. constraints:
  171. Range:
  172. # @see PHP_INT_MIN (32-bit)
  173. min: -2147483648
  174. # @see PHP_INT_MAX (32-bit)
  175. max: 2147483647
  176. FullyValidatable: ~
  177. # Complex extended data types:
  178. # Root of a configuration object.
  179. _core_config_info:
  180. type: mapping
  181. mapping:
  182. default_config_hash:
  183. type: string
  184. label: 'Default configuration hash'
  185. constraints:
  186. NotNull: []
  187. Regex:
  188. pattern: '/^[a-zA-Z0-9\-_]+$/'
  189. # The hash is a base64-encoded version of the config's SHA-256 hash. Given
  190. # the deterministic length of a SHA-256 hash, and the way base64 encoding
  191. # works, this is always going to be 43 characters long.
  192. Length:
  193. exactly: 43
  194. constraints:
  195. ValidKeys:
  196. allowedKeys: ['default_config_hash']
  197. config_object:
  198. type: mapping
  199. mapping:
  200. _core:
  201. # This only exists for merging configuration; it's not required.
  202. requiredKey: false
  203. type: _core_config_info
  204. langcode:
  205. requiredKey: false
  206. type: langcode
  207. constraints:
  208. # The `langcode` key:
  209. # - MUST be specified when there are translatable values
  210. # - MUST NOT be specified when there are no translatable values.
  211. # Translatable values are specified for this config schema type (a subtype of `type: config_object`) if the
  212. # `translatable` flag is present and set to `true` for *any* element in that config schema type.
  213. LangcodeRequiredIfTranslatableValues: ~
  214. # Mail text with subject and body parts.
  215. mail:
  216. type: mapping
  217. label: 'Mail'
  218. mapping:
  219. subject:
  220. type: required_label
  221. label: 'Subject'
  222. body:
  223. type: text
  224. label: 'Body'
  225. # Filter with module and status.
  226. filter:
  227. type: mapping
  228. label: 'Filter'
  229. mapping:
  230. id:
  231. type: string
  232. label: 'ID'
  233. constraints:
  234. PluginExists:
  235. manager: plugin.manager.filter
  236. interface: 'Drupal\filter\Plugin\FilterInterface'
  237. provider:
  238. type: string
  239. label: 'Provider'
  240. status:
  241. type: boolean
  242. label: 'Status'
  243. weight:
  244. type: weight
  245. label: 'Weight'
  246. settings:
  247. type: filter_settings.[%parent.id]
  248. # System action configuration base.
  249. action_configuration_default:
  250. type: sequence
  251. label: 'Action configuration'
  252. sequence:
  253. type: string
  254. theme_settings:
  255. type: config_object
  256. mapping:
  257. favicon:
  258. type: mapping
  259. label: 'Shortcut icon settings'
  260. mapping:
  261. mimetype:
  262. type: string
  263. label: 'MIME type'
  264. path:
  265. type: string
  266. label: 'Path'
  267. url:
  268. type: string
  269. label: 'URL'
  270. use_default:
  271. type: boolean
  272. label: 'Use the default shortcut icon supplied by the theme'
  273. features:
  274. type: mapping
  275. label: 'Optional features'
  276. mapping:
  277. comment_user_picture:
  278. type: boolean
  279. label: 'User pictures in comments'
  280. comment_user_verification:
  281. type: boolean
  282. label: 'User verification status in comments'
  283. favicon:
  284. type: boolean
  285. label: 'Shortcut icon'
  286. logo:
  287. type: boolean
  288. label: 'Logo'
  289. name:
  290. type: boolean
  291. label: 'Site name'
  292. node_user_picture:
  293. type: boolean
  294. label: 'User pictures in posts'
  295. slogan:
  296. type: boolean
  297. label: 'Site slogan'
  298. logo:
  299. type: mapping
  300. label: 'Logo settings'
  301. mapping:
  302. path:
  303. type: string
  304. label: 'Logo path'
  305. url:
  306. type: uri
  307. nullable: true
  308. label: 'URL'
  309. use_default:
  310. type: boolean
  311. label: 'Use default'
  312. third_party_settings:
  313. # Third party settings are always optional: they're an optional extension
  314. # point.
  315. requiredKey: false
  316. type: sequence
  317. label: 'Third party settings'
  318. sequence:
  319. type: theme_settings.third_party.[%key]
  320. # Array of routes with route_name and route_params keys.
  321. route:
  322. type: mapping
  323. label: 'Route'
  324. mapping:
  325. route_name:
  326. type: string
  327. label: 'Route Name'
  328. route_params:
  329. type: sequence
  330. label: 'Route Params'
  331. sequence:
  332. type: string
  333. label: 'Param'
  334. # Config dependencies.
  335. config_dependencies_base:
  336. type: mapping
  337. mapping:
  338. config:
  339. # All dependency keys are optional: this might not depend on any other config.
  340. requiredKey: false
  341. type: sequence
  342. label: 'Configuration entity dependencies'
  343. sequence:
  344. type: string
  345. constraints:
  346. NotBlank: []
  347. ConfigExists: []
  348. content:
  349. # All dependency keys are optional: this might not depend on any content entities.
  350. requiredKey: false
  351. type: sequence
  352. label: 'Content entity dependencies'
  353. sequence:
  354. type: string
  355. module:
  356. # All dependency keys are optional: this might not depend on any modules.
  357. requiredKey: false
  358. type: sequence
  359. label: 'Module dependencies'
  360. sequence:
  361. type: string
  362. constraints:
  363. NotBlank: []
  364. ExtensionName: []
  365. ExtensionExists:
  366. type: module
  367. theme:
  368. # All dependency keys are optional: this might not depend on any themes.
  369. requiredKey: false
  370. type: sequence
  371. label: 'Theme dependencies'
  372. sequence:
  373. type: string
  374. constraints:
  375. NotBlank: []
  376. ExtensionName: []
  377. ExtensionExists:
  378. type: theme
  379. constraints:
  380. ValidKeys:
  381. allowedKeys: '<infer>'
  382. config_dependencies:
  383. type: config_dependencies_base
  384. label: 'Configuration dependencies'
  385. mapping:
  386. enforced:
  387. # All dependency keys are optional: this may have no dependencies at all.
  388. requiredKey: false
  389. type: config_dependencies_base
  390. label: 'Enforced configuration dependencies'
  391. constraints:
  392. ValidKeys:
  393. allowedKeys: '<infer>'
  394. config_entity:
  395. type: mapping
  396. mapping:
  397. uuid:
  398. type: uuid
  399. label: 'UUID'
  400. langcode:
  401. type: langcode
  402. status:
  403. type: boolean
  404. label: 'Status'
  405. dependencies:
  406. type: config_dependencies
  407. label: 'Dependencies'
  408. third_party_settings:
  409. # Third party settings are always optional: they're an optional extension
  410. # point.
  411. requiredKey: false
  412. type: sequence
  413. label: 'Third party settings'
  414. sequence:
  415. type: '[%parent.%parent.%type].third_party.[%key]'
  416. _core:
  417. # This only exists for merging configuration; it's not required.
  418. requiredKey: false
  419. type: _core_config_info
  420. # This applies to all blocks that have no additional settings of their own.
  421. block.settings.*:
  422. type: block_settings
  423. constraints:
  424. FullyValidatable: ~
  425. block_settings:
  426. type: mapping
  427. label: 'Block settings'
  428. # This is intentionally not marked as fully validatable: each `type: block.settings.SOMETHING` must do that.
  429. mapping:
  430. id:
  431. type: string
  432. label: 'ID'
  433. label:
  434. type: label
  435. label: 'Description'
  436. label_display:
  437. type: string
  438. label: 'Display title'
  439. constraints:
  440. Choice:
  441. choices:
  442. - '0'
  443. - visible
  444. NotBlank: []
  445. provider:
  446. type: string
  447. label: 'Provider of this block plugin'
  448. constraints:
  449. NotBlank: []
  450. ExtensionName: []
  451. ExtensionExists:
  452. type: module
  453. context_mapping:
  454. requiredKey: false
  455. type: sequence
  456. label: 'Context assignments'
  457. sequence:
  458. type: string
  459. condition.plugin:
  460. type: mapping
  461. label: 'Condition'
  462. mapping:
  463. id:
  464. type: string
  465. label: 'ID'
  466. constraints:
  467. PluginExists:
  468. manager: plugin.manager.condition
  469. interface: 'Drupal\Core\Condition\ConditionInterface'
  470. negate:
  471. type: boolean
  472. label: 'Negate'
  473. context_mapping:
  474. requiredKey: false
  475. type: sequence
  476. label: 'Context assignments'
  477. sequence:
  478. type: string
  479. condition.plugin.entity_bundle:*:
  480. type: condition.plugin
  481. mapping:
  482. bundles:
  483. type: sequence
  484. sequence:
  485. type: string
  486. display_variant.plugin:
  487. type: mapping
  488. label: 'Display variant'
  489. mapping:
  490. id:
  491. type: string
  492. label: 'ID'
  493. label:
  494. type: required_label
  495. label: 'Label'
  496. weight:
  497. type: weight
  498. label: 'Weight'
  499. uuid:
  500. type: uuid
  501. layout_plugin.settings:
  502. type: mapping
  503. label: 'Layout settings'
  504. mapping:
  505. label:
  506. type: label
  507. label: 'Label'
  508. context_mapping:
  509. type: sequence
  510. label: 'Context assignments'
  511. sequence:
  512. type: string
  513. # Specify defaults.
  514. layout_plugin.settings.*:
  515. type: layout_plugin.settings
  516. base_entity_reference_field_settings:
  517. type: mapping
  518. mapping:
  519. target_type:
  520. type: string
  521. label: 'Type of item to reference'
  522. field_config_base:
  523. type: config_entity
  524. mapping:
  525. id:
  526. type: string
  527. label: 'ID'
  528. constraints:
  529. StringEqualsConcatenatedValues:
  530. separator: .
  531. values:
  532. - '%parent.entity_type'
  533. - '%parent.bundle'
  534. - '%parent.field_name'
  535. field_name:
  536. type: machine_name
  537. label: 'Field name'
  538. entity_type:
  539. type: string
  540. label: 'Entity type'
  541. constraints:
  542. PluginExists:
  543. manager: 'entity_type.manager'
  544. interface: '\Drupal\Core\Entity\FieldableEntityInterface'
  545. bundle:
  546. type: string
  547. label: 'Bundle'
  548. constraints:
  549. EntityBundleExists:
  550. entityTypeId: '%parent.entity_type'
  551. label:
  552. type: required_label
  553. label: 'Label'
  554. description:
  555. type: text
  556. label: 'Help text'
  557. required:
  558. type: boolean
  559. label: 'Required field'
  560. translatable:
  561. type: boolean
  562. label: 'Translatable'
  563. default_value:
  564. type: sequence
  565. label: 'Default values'
  566. sequence:
  567. type: field.value.[%parent.%parent.field_type]
  568. label: 'Default value'
  569. default_value_callback:
  570. type: string
  571. label: 'Default value callback'
  572. settings:
  573. type: field.field_settings.[%parent.field_type]
  574. field_type:
  575. type: string
  576. label: 'Field type'
  577. constraints:
  578. PluginExists:
  579. manager: plugin.manager.field.field_type
  580. interface: '\Drupal\Core\Field\FieldItemInterface'
  581. constraints:
  582. FullyValidatable: ~
  583. core.base_field_override.*.*.*:
  584. type: field_config_base
  585. label: 'Base field bundle override'
  586. constraints:
  587. FullyValidatable: ~
  588. core.date_format.*:
  589. type: config_entity
  590. label: 'Date format'
  591. mapping:
  592. id:
  593. type: machine_name
  594. label: 'ID'
  595. label:
  596. type: required_label
  597. label: 'Label'
  598. locked:
  599. type: boolean
  600. label: 'Locked'
  601. pattern:
  602. type: core_date_format_pattern.[%parent.locked]
  603. label: 'PHP date format'
  604. constraints:
  605. NotBlank: []
  606. # A valid date format character must appear somewhere in the value.
  607. # See https://www.php.net/manual/en/datetime.format.php
  608. Regex:
  609. pattern: '/[aABcdDeFgGhHiIjlLmMnNoOpPrsStTuUvwWxXyYzZ]/'
  610. message: 'This is not a valid date format.'
  611. constraints:
  612. FullyValidatable: ~
  613. # Unlocked date formats should use the translatable type.
  614. core_date_format_pattern.0:
  615. type: date_format
  616. label: 'Date format'
  617. # Locked date formats are just used to transport the value.
  618. core_date_format_pattern.1:
  619. type: string
  620. label: 'Date format'
  621. # Generic field settings schemas.
  622. field.storage_settings.*:
  623. type: mapping
  624. label: 'Settings'
  625. # By default, a field type has no settings, so this can safely be considered
  626. # fully validatable. A `FOO` field type that has one or more settings is
  627. # required to create a `field.storage_settings.FOO` config schema type, and
  628. # cannot possibly forget to do that, because validation errors would be
  629. # triggered if it ever tried to save a setting, since this mapping allows no
  630. # key-value pairs at all.
  631. constraints:
  632. FullyValidatable: ~
  633. field.field_settings.*:
  634. type: mapping
  635. label: 'Settings'
  636. # By default, a field type has no settings, so this can safely be considered
  637. # fully validatable. A `FOO` field type that has one or more settings is
  638. # required to create a `field.field_settings.FOO` config schema type, and
  639. # cannot possibly forget to do that, because validation errors would be
  640. # triggered if it ever tried to save a setting, since this mapping allows no
  641. # key-value pairs at all.
  642. constraints:
  643. FullyValidatable: ~
  644. field.value.*:
  645. type: mapping
  646. label: 'Default value'
  647. # Schema for the configuration of the String field type.
  648. # This field type has no field instance settings, so no specific config schema type.
  649. # @see `type: field.field_settings.*`
  650. field.storage_settings.string:
  651. type: mapping
  652. label: 'String settings'
  653. mapping:
  654. max_length:
  655. type: integer
  656. label: 'Maximum length'
  657. case_sensitive:
  658. type: boolean
  659. label: 'Case sensitive'
  660. is_ascii:
  661. type: boolean
  662. label: 'Contains US ASCII characters only'
  663. field.value.string:
  664. type: mapping
  665. label: 'Default value'
  666. mapping:
  667. value:
  668. type: label
  669. label: 'Value'
  670. # Schema for the configuration of the String (long) field type.
  671. field.storage_settings.string_long:
  672. type: mapping
  673. label: 'String (long) settings'
  674. mapping:
  675. case_sensitive:
  676. type: boolean
  677. label: 'Case sensitive'
  678. field.value.string_long:
  679. type: mapping
  680. label: 'Default value'
  681. mapping:
  682. value:
  683. type: text
  684. label: 'Value'
  685. # Schema for the configuration of the Password field type.
  686. # This field type has no field instance settings, so no specific config schema type.
  687. # @see `type: field.field_settings.*`
  688. field.storage_settings.password:
  689. type: field.storage_settings.string
  690. label: 'Password settings'
  691. # Schema for the configuration of the URI field type.
  692. # This field type has no field instance settings, so no specific config schema type.
  693. # @see `type: field.field_settings.*`
  694. field.storage_settings.uri:
  695. type: field.storage_settings.string
  696. label: 'URI settings'
  697. mapping:
  698. max_length:
  699. type: integer
  700. label: 'Maximum length'
  701. case_sensitive:
  702. type: boolean
  703. label: 'Case sensitive'
  704. field.value.uri:
  705. type: mapping
  706. label: 'Default value'
  707. mapping:
  708. value:
  709. type: string
  710. label: 'Value'
  711. # Schema for the configuration of the Created field type.
  712. # This field type has no field storage settings, so no specific config schema type.
  713. # @see `type: field.storage_settings.*`
  714. # This field type has no field instance settings, so no specific config schema type.
  715. # @see `type: field.field_settings.*`
  716. field.value.created:
  717. type: mapping
  718. label: 'Default value'
  719. mapping:
  720. value:
  721. type: integer
  722. label: 'Value'
  723. # Schema for the configuration of the Changed field type.
  724. # This field type has no field storage settings, so no specific config schema type.
  725. # @see `type: field.storage_settings.*`
  726. # This field type has no field instance settings, so no specific config schema type.
  727. # @see `type: field.field_settings.*`
  728. field.value.changed:
  729. type: mapping
  730. label: 'Default value'
  731. mapping:
  732. value:
  733. type: integer
  734. label: 'Value'
  735. # Schema for the configuration of the Entity reference field type.
  736. field.storage_settings.entity_reference:
  737. type: mapping
  738. label: 'Entity reference field storage settings'
  739. mapping:
  740. target_type:
  741. type: string
  742. label: 'Type of item to reference'
  743. field.field_settings.entity_reference:
  744. type: mapping
  745. label: 'Entity reference field settings'
  746. mapping:
  747. handler:
  748. type: string
  749. label: 'Reference method'
  750. constraints:
  751. PluginExists:
  752. manager: plugin.manager.entity_reference_selection
  753. interface: 'Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface'
  754. # @todo Remove this line and explicitly require valid entity reference
  755. # selection plugin IDs in https://drupal.org/i/3420198.
  756. allowFallback: true
  757. handler_settings:
  758. type: entity_reference_selection.[%parent.handler]
  759. label: 'Entity reference selection plugin settings'
  760. field.value.entity_reference:
  761. type: mapping
  762. label: 'Default value'
  763. mapping:
  764. target_id:
  765. type: string
  766. label: 'Value'
  767. target_uuid:
  768. type: uuid
  769. # Schema for the configuration of the Boolean field type.
  770. field.field_settings.boolean:
  771. label: 'Boolean settings'
  772. type: mapping
  773. mapping:
  774. on_label:
  775. type: required_label
  776. label: 'On label'
  777. off_label:
  778. type: required_label
  779. label: 'Off label'
  780. field.value.boolean:
  781. type: mapping
  782. mapping:
  783. value:
  784. type: integer
  785. label: 'Value'
  786. # Schema for the configuration of the Email field type.
  787. # This field type has no field storage settings, so no specific config schema type.
  788. # @see `type: field.storage_settings.*`
  789. field.field_settings.email:
  790. type: mapping
  791. label: 'Email settings'
  792. sequence:
  793. type: string
  794. label: 'Setting'
  795. field.value.email:
  796. type: mapping
  797. label: 'Default value'
  798. mapping:
  799. value:
  800. type: email
  801. label: 'Value'
  802. # Schema for the configuration of the Integer field type.
  803. field.storage_settings.integer:
  804. type: mapping
  805. label: 'Integer settings'
  806. mapping:
  807. unsigned:
  808. type: boolean
  809. label: 'Unsigned'
  810. size:
  811. type: string
  812. label: 'Database storage size'
  813. field.field_settings.integer:
  814. type: mapping
  815. label: 'Integer'
  816. mapping:
  817. min:
  818. type: integer
  819. label: 'Minimum'
  820. max:
  821. type: integer
  822. label: 'Maximum'
  823. prefix:
  824. type: label
  825. label: 'Prefix'
  826. suffix:
  827. type: label
  828. label: 'Suffix'
  829. field.value.integer:
  830. type: mapping
  831. label: 'Default value'
  832. mapping:
  833. value:
  834. type: integer
  835. label: 'Value'
  836. # Schema for the configuration of the Decimal field type.
  837. field.storage_settings.decimal:
  838. type: mapping
  839. label: 'Decimal settings'
  840. mapping:
  841. precision:
  842. type: integer
  843. label: 'Precision'
  844. scale:
  845. type: integer
  846. label: 'Scale'
  847. field.field_settings.decimal:
  848. type: mapping
  849. label: 'Decimal settings'
  850. mapping:
  851. min:
  852. type: float
  853. label: 'Minimum'
  854. max:
  855. type: float
  856. label: 'Maximum'
  857. prefix:
  858. type: label
  859. label: 'Prefix'
  860. suffix:
  861. type: label
  862. label: 'Suffix'
  863. field.value.decimal:
  864. type: mapping
  865. label: 'Default value'
  866. mapping:
  867. value:
  868. type: float
  869. label: 'Value'
  870. # Schema for the configuration of the Float field type.
  871. field.storage_settings.float:
  872. type: mapping
  873. label: 'Float settings'
  874. field.field_settings.float:
  875. type: mapping
  876. label: 'Float settings'
  877. mapping:
  878. min:
  879. type: float
  880. label: 'Minimum'
  881. max:
  882. type: float
  883. label: 'Maximum'
  884. prefix:
  885. type: label
  886. label: 'Prefix'
  887. suffix:
  888. type: label
  889. label: 'Suffix'
  890. field.value.float:
  891. type: mapping
  892. label: 'Default value'
  893. mapping:
  894. value:
  895. type: float
  896. label: 'Value'
  897. # Schema for the configuration of the Timestamp field type.
  898. field.value.timestamp:
  899. type: mapping
  900. label: 'Timestamp value'
  901. mapping:
  902. value:
  903. type: timestamp
  904. label: 'Value'
  905. field.value.language:
  906. type: mapping
  907. label: 'Language value'
  908. mapping:
  909. value:
  910. # Not this doesn't make use of type: langcode because that doesn't allow null values.
  911. type: string
  912. label: 'Language value'
  913. constraints:
  914. Choice:
  915. callback: 'Drupal\Core\TypedData\Plugin\DataType\LanguageReference::getAllValidLangcodes'
  916. # Text with a text format.
  917. text_format:
  918. type: mapping
  919. label: 'Text with text format'
  920. # We declare the entire mapping of text and text format as translatable. This
  921. # causes the entire mapping to be saved to the language overrides of the
  922. # configuration. Storing only the (to be formatted) text could result in
  923. # security problems in case the text format of the source text is changed.
  924. translatable: true
  925. mapping:
  926. value:
  927. type: text
  928. label: 'Text'
  929. # Mark the actual text as translatable (in addition to the entire mapping
  930. # being marked as translatable) so that shipped configuration with
  931. # formatted text can participate in the string translation system.
  932. translatable: true
  933. format:
  934. type: string
  935. label: 'Text format'
  936. # The text format should not be translated as part of the string
  937. # translation system, so this is not marked as translatable.
  938. # Base schema for all entity reference selection handler schemas.
  939. entity_reference_selection:
  940. type: mapping
  941. label: 'Entity reference selection handler settings'
  942. mapping:
  943. target_type:
  944. type: string
  945. label: 'Type of item to reference'
  946. # Schema for all entity reference selection handlers that are not providing a
  947. # specific schema.
  948. entity_reference_selection.*:
  949. type: entity_reference_selection
  950. # Schema for the entity reference 'default' selection handler settings.
  951. entity_reference_selection.default:
  952. type: entity_reference_selection
  953. label: 'Default selection handler settings'
  954. mapping:
  955. target_bundles:
  956. type: sequence
  957. label: 'types'
  958. nullable: true
  959. sequence:
  960. type: string
  961. label: 'Bundle'
  962. sort:
  963. type: mapping
  964. label: 'Sort settings'
  965. mapping:
  966. field:
  967. type: string
  968. label: 'Sort by'
  969. direction:
  970. type: string
  971. label: 'Sort direction'
  972. auto_create:
  973. type: boolean
  974. label: 'Create referenced entities if they don''t already exist'
  975. auto_create_bundle:
  976. type: string
  977. label: 'Bundle assigned to the auto-created entities.'
  978. # Schema for all entity reference 'default:*' selection handlers that are not
  979. # providing a specific schema.
  980. entity_reference_selection.default:*:
  981. type: entity_reference_selection.default
  982. # Schema for the configuration of mailer transport DSN.
  983. mailer_dsn:
  984. type: mapping
  985. label: 'Symfony mailer transport DSN'
  986. mapping:
  987. scheme:
  988. type: string
  989. label: 'Scheme'
  990. constraints:
  991. NotBlank:
  992. message: 'The mailer DSN must contain a scheme.'
  993. Regex:
  994. # https://datatracker.ietf.org/doc/html/rfc3986#appendix-A
  995. pattern: '/^[a-z][a-z0-9+\-\.]*$/i'
  996. message: 'The mailer DSN scheme must start with a letter followed by zero or more letters, numbers, plus (+), minus (-) or periods (.)'
  997. host:
  998. type: string
  999. label: 'Host'
  1000. constraints:
  1001. NotBlank:
  1002. message: 'The mailer DSN must contain a host (use "default" by default).'
  1003. UriHost:
  1004. message: 'The mailer DSN host should conform to RFC 3986 URI host component.'
  1005. user:
  1006. type: string
  1007. nullable: true
  1008. label: 'User'
  1009. password:
  1010. type: string
  1011. nullable: true
  1012. label: 'Password'
  1013. port:
  1014. type: integer
  1015. nullable: true
  1016. label: 'Port'
  1017. constraints:
  1018. Range:
  1019. min: 0
  1020. max: 65535
  1021. notInRangeMessage: 'The mailer DSN port must be between 0 and 65535.'
  1022. options:
  1023. type: mailer_dsn.options.[%parent.scheme]
  1024. label: 'Options'
  1025. mailer_dsn.options.*:
  1026. type: sequence
  1027. label: 'Options'
  1028. sequence:
  1029. type: string
  1030. label: Option
  1031. constraints:
  1032. NotNull: []
  1033. mailer_dsn.options.null:
  1034. type: mapping
  1035. label: 'Null transport options'
  1036. mapping: {}
  1037. mailer_dsn.options.native:
  1038. type: mailer_dsn.options.null
  1039. mailer_dsn.options.sendmail:
  1040. type: mapping
  1041. label: 'Sendmail transport options'
  1042. mapping:
  1043. command:
  1044. type: string
  1045. nullable: true
  1046. label: 'Command to be executed by sendmail transport'
  1047. constraints:
  1048. Regex:
  1049. # Forbid any kind of control character.
  1050. # @see https://stackoverflow.com/a/66587087
  1051. pattern: '/([^\PC])/u'
  1052. match: false
  1053. message: 'The command option is not allowed to span multiple lines or contain control characters.'
  1054. mailer_dsn.options.sendmail+smtp:
  1055. type: mailer_dsn.options.sendmail
  1056. label: 'Sendmail transport options'
  1057. mailer_dsn.options.smtp:
  1058. type: mapping
  1059. label: 'SMTP options'
  1060. mapping:
  1061. auto_tls:
  1062. type: boolean
  1063. nullable: true
  1064. label: 'Whether or not to enable TLS opportunistically (defaults to true).'
  1065. require_tls:
  1066. type: boolean
  1067. nullable: true
  1068. label: 'Whether or not to enforce TLS (defaults to false).'
  1069. verify_peer:
  1070. type: boolean
  1071. nullable: true
  1072. label: 'TLS Peer Verification (defaults to true)'
  1073. source_ip:
  1074. type: string
  1075. nullable: true
  1076. label: 'Bind to a specific IPv4 or IPv6 address (no default).'
  1077. constraints:
  1078. UriHost:
  1079. message: 'The source IP should conform to RFC 3986 URI host component.'
  1080. peer_fingerprint:
  1081. type: string
  1082. nullable: true
  1083. label: 'TLS Peer Fingerprint (no default)'
  1084. constraints:
  1085. Regex:
  1086. pattern: '/^[a-fA-F0-9]+$/'
  1087. message: 'The peer_fingerprint option requires an md5, sha1 or sha256 certificate fingerprint in hex with all separators (colons) removed.'
  1088. local_domain:
  1089. type: string
  1090. nullable: true
  1091. label: 'Domain name or IP address that represents the identity of the client when establishing the SMTP session (defaults to 127.0.0.1)'
  1092. constraints:
  1093. Regex:
  1094. # Forbid any kind of control character.
  1095. # @see https://stackoverflow.com/a/66587087
  1096. pattern: '/([^\PC])/u'
  1097. match: false
  1098. message: 'The local_domain is not allowed to span multiple lines or contain control characters.'
  1099. restart_threshold:
  1100. type: integer
  1101. nullable: true
  1102. label: 'Maximum number of messages to send before re-starting the transport (defaults to 100 messages)'
  1103. constraints:
  1104. PositiveOrZero: ~
  1105. restart_threshold_sleep:
  1106. type: float
  1107. nullable: true
  1108. label: 'Number of seconds to sleep between stopping and re-starting the transport (defaults to no delay)'
  1109. constraints:
  1110. PositiveOrZero: ~
  1111. ping_threshold:
  1112. type: integer
  1113. nullable: true
  1114. label: 'The minimum number of seconds between two messages required to ping the server (defaults to 100 seconds)'
  1115. constraints:
  1116. PositiveOrZero: ~
  1117. max_per_second:
  1118. type: integer
  1119. nullable: true
  1120. label: 'The number of messages to send per second (defaults to no limit)'
  1121. constraints:
  1122. PositiveOrZero: ~
  1123. mailer_dsn.options.smtps:
  1124. type: mailer_dsn.options.smtp
  1125. label: 'Secure SMTP options'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.