Skip to content
Snippets Groups Projects

Add Pattern entity

Compare and
11 files
+ 699
24
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -243,3 +243,38 @@ field.field_settings.component_tree:
type: field.field_settings.*
constraints:
FullyValidatable: ~
experience_builder.pattern.*:
type: config_entity
constraints:
FullyValidatable: ~
mapping:
id:
type: machine_name
label: 'ID'
label:
type: required_label
label: 'Label'
# A single component tree.
component_tree:
constraints:
ComponentTreeMeetRequirements:
# Only StaticPropSources may be used, because a Pattern cannot rely on an entity of a particular type
# and bundle to be present everywhere it is inserted/used.
props:
absence:
- dynamic
- adapter
presence: ~
tree:
absence:
# Components implementing either of these 3 interfaces are only
# allowed to live at the PageTemplate level.
# @see \Drupal\experience_builder\Entity\PageTemplate
# @see `type: experience_builder.page_template.*`
- Drupal\Core\Block\MainContentBlockPluginInterface
- Drupal\Core\Block\TitleBlockPluginInterface
- Drupal\Core\Block\MessagesBlockPluginInterface
presence: ~
type: experience_builder.component_tree
label: 'The component tree that represents a reusable pattern'
Loading