There's a bit of a paradigm shift in XF2 which comes with the move away from plain arrays to objects. Some of the biggest benefits of objects is that things can be dynamically loaded on demand rather than being loaded up front.
You might find, for example, that you get an entity and you know it should have a relation to another table, but you might not see its data listed when you dump the object. That's because it hasn't been fetched in advance but calling it will generate a query to bring that data in. You can see the Data relation here because it is called automatically.
But additionally objects contain a bunch of methods - you can call these directly if you like, e.g. {$attachment.canView()}
can be called but you won't see that when you're dumping the entity either.
Sometimes there are methods which are mapped directly to field names, these are called getters. has_thumbnail
is a getter and that maps to the hasThumbnail()
method. Similary thumbnail_url
maps to the getThumbnailUrl()
method. These methods and their values won't be visible in the dump, but they are there.
The way to know they are there is to look at the Entity structure, which is generally at the bottom of each Entity class.