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

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