imaging that I have an object and that can be called in a branch template, like this:
{{ object1.object2.object3.property3A }}
well, it will show me the content if we use php to write:
$object1->getObject2()->getObject3()->getProperty3A();
My question is: if I have a string,
$refString="object1.object2.object3.property3A";
and then it is passed to the branch, how can I get property 3A? In my experience, we can do this in php as follows:
$refString="object1->getObject2()->getObject3()->getProperty3A()";
echo $$refString;
But I do not know how to make it work on a branch.
source
share