I'm not sure what you are showing in your pictures, but let's say for example it is a Tour Entity. Then you can access with your setters and getters and display in dump
. So in the above you have a picture showing the Tour object and dumping it in Twig. The Tour Entity probably has a getTourId()
type method.
So to show in your twig, you can do like this:
{{ dump(tour.getTourId) }}
When you see multiple levels, then it's probably an array collection. Then you would need to get the sub Entity can call it's method. Let's say a Tour Entity, has a collection of Dates (a Date Entity), and maybe the Date entity has a getDate()
function.
So then you would call like so:
{{ dump(tour.getDate[0].getDate) }}
Where getDate[0]
is the first element in the array collection of Dates in the Tour object. The element is an object, so you call it's method getDate
.
This is how things are done in Twig. It's all object based, and very easy to use. Normally dump is not used. You don't want to use it in a Production environment, because you may get users seeing the famous 500
error page.