[FEATURE] Support nesting in v:variable.set#1514
Conversation
SetViewHelper could only set direct child properties of arrays or objects before, which is inconvenient when working with nested structures. This change adds code to access properties nested at arbitrary levels inside mixed array/object hierarchies.
|
I think we should solve this in Fluid instead, making it possible to The code on the link uses ObjectAccess and obviously Fluid can't do that - instead it can use the internal methods on VariableProvider that resolves a value. We can change those methods so they return references to avoid the deference-if-parent-is-array problem described in the comment. Then after all that we should simply deprecate the VHS ViewHelper. |
|
Like this: TYPO3/Fluid#425 ;) |
|
As long as it works and the feature set is roughly the same as with |
|
Closing this one, will pursue getting the Fluid-native feature merged. |
SetViewHelper could only set direct child properties of arrays or
objects before, which is inconvenient when working with nested
structures. This change adds code to access properties nested at
arbitrary levels inside mixed array/object hierarchies.
This is actually much more complicated then I'd like, but so far I haven't found an easy way around it. Suggestions to make it more readable very welcome. Maybe there's already a helper function for this somewhere that I missed?