[MAGNOLIA-7060] Override properties in YAML include Created: 08/Jun/17 Updated: 31/Jan/18 Resolved: 31/Jul/17 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 5.5.4 |
| Fix Version/s: | 5.5.6, 5.6 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||
| Epic Link: | LD: Fundamental features | ||||||||||||||||
| Sprint: | Basel 103, Basel 104, Basel 105, Basel 106, Basel 107 | ||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
Enhance "!include" for YAML.
Note: this is a part of the "Inheritance of definitions from registry" initiative (former "YAML extends"). |
| Comments |
| Comment by Christopher Zimmermann [ 08/Jun/17 ] |
|
Feature should work as proposed here as "!extend", (except it is available on the existing "!include" keyword instead): Most relevant:
form:
tabs:
# We extend a sample tab here and add a fourth field definition.
- !extend:/light-yaml-sample/samples/sampleTab.yaml
name: extendedTab
fields:
- name: qux
class: i.m.ui.form.field.definition.LinkFieldDefinition
# We also change the type of the field foo from simple text field to a rich-text field
- name: foo
class: i.m.ui.form.field.definition.RichTextFieldDefinition
# Actions are reused from the sampple file as
actions: !extend:/light-yaml-sample/samples/common-actions.yaml
AND: # We specify the type of a definition we are going to extend (in this case it is 'dialog' which automatically maps to the DialogDefinitionRegistry) and the target definition reference in the registry, # for the case of dialogs it consists of a module name + definition name !extend-def:dialog:light-yaml-sample:dialogA form: tabs: - name: extendedTab # Despite the fact that we extend dialogA definition, the 'extendedTab' will contain only one field definition since we annotate 'fields' list with !override tag fields: !override - name: quux class: i.m.ui.form.field.definition.TextFieldDefinition |