50918[FEATURE] Support resolving sub variables of Fluid Standalone
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 2
Review log 1517
-
Nicole Hummel uploaded patch set 1 12/09/16, 12:29
-
TYPO3com voted on patch set 1 V +1 12/09/16, 12:33 Completed build in 04m 18s on Fri, 9 Dec, 01:33 PM Test Summary: 54379 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5652
-
Oliver Klee updated the commit message in patch set 2 12/09/16, 12:42
-
Andreas Allacher commented on patch set 2 12/09/16, 12:46
-
TYPO3com voted on patch set 2 V +1 12/09/16, 12:47 Completed build in 04m 02s on Fri, 9 Dec, 01:47 PM Test Summary: 54379 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5656
-
Andreas Allacher commented on patch set 2 12/09/16, 12:51
CmsVariableProvider.php:40ReplyI think the best wway would be to override VariableExtractor and modify extractSingleValue to use ObjectStorage instead: https://github.com/TYPO3/Fluid/blob/master/src/Core/Variables/VariableExtractor.php#L130 That way the tricky part is done by VariableExtractor and the resolving is always done by using ObjectAccess. -
Andreas Allacher commented on patch set 2 12/09/16, 12:55
CmsVariableProvider.php:40ReplySorry, my fault. Overriding extractsingleValue would not work. We would have to override getByPath and ensure to keep the part about resolveSubVariableReferences before using ObjectAccess. -
Tymoteusz Motylewski commented on patch set 2 CR -1 01/08/17, 16:53
That's a useful feature indeed. However an RST file is missing. -
Christian Müllenhagen commented on patch set 2 01/09/17, 17:04
CmsVariableProvider.php:39As you return in the if-case, the else intendation is superfluous. -
Oliver Hader commented on patch set 2 CR -1 01/12/17, 16:35
What's the concept behind this change in allowing recursive variable interpolation? Basically this allows "{f{o{oo{ooo}}}}", similar to ${'v' . $foo} in PHP which feels very hacky.There are other data-structures to achieve this. However, I might miss a useful case, where this is really required. -
Nicole Hummel commented on patch set 2 01/12/17, 16:42
@Oliver please ask about the concept in Fluid Standalone. This patch was just the aim to support the requested Fluid feature to core -
Andreas Allacher commented on patch set 2 01/12/17, 17:23
The use case is quite simple: You have a dynamic key and want to access that array value or property. Of course, you could use/create a ViewHelper to achieve this but it makes it unnecessary complex. This solution is way easier to use. -
Andreas Allacher commented on patch set 2 01/12/17, 17:25
The use case is quite simple: You have a dynamic key and want to access that array value or property. --> because you can now do the following: {object.{dynamicPropertyName}} -
Claus Due commented on patch set 2 01/20/17, 23:52
Just FYI, there is a plan to fix this by merging VariableExtractor into VariableProvider in Fluid standalone; that change would make this use case supported in TYPO3, potentially without requiring any changes. The main problem is indeed that VariableExtractor won't behave the same way that CmsVariableProvider does so we'll aim to get rid of VariableExtractor and give the responsibility to the VariableProvider. -
Claus Due commented on patch set 2 CR +1 01/20/17, 23:55
Throwing a +1 in here because as a quick workaround, this should do the job. Although I'd say it could easily be a BUGFIX - the problem has been around ever since switching to Fluid standalone. You may however want to hold off merging this - since it may be solved in Fluid standalone, see previous comment. -
Claus Due commented on patch set 2 03/12/17, 17:35
Can be abandoned - fixed by https://review.typo3.org/51841 -
Nicole Hummel abandoned the change 03/13/17, 21:48
Fixed with https://review.typo3.org/51841/
CmsVariableProvider.php:40