typewhich denotes whether it serves as a
"type": "text"in this nested structure might feel somewhat redundant you might think - of course there will be a text shown.
text-heroblock but suddenly it contains an image. That is due to the internal structure of our CMS and the generic nature of blocks. The slots defined by a block are abstract. In the examples shown above, the text-hero block only contains one slot, named
typeconfiguration which determines the correct page resolver to resolve its content. Together with the resolver context the resolver is be able to resolve the correct criteria for the element. All criterias are collected in a criteria collection. Shopware will optimize those criterias (e.g. by splitting searches from direct lookups or merging duplicate requests) and execute the resulting queries.
getType() : stringreturns the matching type of elements
collect(CmsSlot, ResolverContext) : CriteriaCollectionprepares the criteria object
enrich(CmsSlot, ResolverContext, ElemetDataCollection) : voidperforms additional logic on the data that has been resolved
voicetype. You name it...