block.schema.yml

Same filename in other branches
  1. 9 core/modules/block/config/schema/block.schema.yml
  2. 8.9.x core/modules/block/config/schema/block.schema.yml
  3. 10 core/modules/block/config/schema/block.schema.yml
core/modules/block/config/schema/block.schema.yml

File

core/modules/block/config/schema/block.schema.yml

View source
  1. # Schema for the configuration files of the Block module.
  2. block.block.*:
  3. type: config_entity
  4. label: 'Block'
  5. constraints:
  6. FullyValidatable: ~
  7. mapping:
  8. id:
  9. type: machine_name
  10. label: 'ID'
  11. # Blocks have atypical machine names: they allow periods for historical reasons.
  12. # @see https://www.drupal.org/project/drupal/issues/2685917
  13. # @see https://www.drupal.org/project/drupal/issues/2043527
  14. constraints:
  15. Regex:
  16. pattern: '/^[a-z0-9_.]+$/'
  17. message: "The %value machine name is not valid."
  18. theme:
  19. type: string
  20. label: 'Theme'
  21. constraints:
  22. NotBlank: []
  23. ExtensionName: []
  24. ExtensionExists: theme
  25. region:
  26. type: string
  27. label: 'Region'
  28. constraints:
  29. NotBlank: []
  30. Callback: ['\Drupal\block\Entity\Block', validateRegion]
  31. weight:
  32. type: weight
  33. label: 'Weight'
  34. provider:
  35. # @todo Deprecate this from config schema and remove it from the `config_export` definition in https://www.drupal.org/project/drupal/issues/3426278
  36. nullable: true
  37. type: string
  38. label: 'Provider'
  39. plugin:
  40. type: string
  41. label: 'Plugin'
  42. constraints:
  43. PluginExists:
  44. manager: plugin.manager.block
  45. interface: Drupal\Core\Block\BlockPluginInterface
  46. # Block plugin IDs may not be valid in blocks that are backed by
  47. # block_content entities that don't exist yet. Therefore, it's okay
  48. # to consider the fallback plugin ID as valid.
  49. allowFallback: true
  50. settings:
  51. type: block.settings.[%parent.plugin]
  52. visibility:
  53. type: sequence
  54. label: 'Visibility Conditions'
  55. sequence:
  56. type: condition.plugin.[id]
  57. label: 'Visibility Condition'

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