How to access a method and pass an argument within the template?
问题 In my template I want check whether an entity has a relation to another one. Meaning one object is in an attached Object Storage of another one. In the controller I can simply call: if ($product->getCategory()->offsetExists($category) { print 'In category ' . $category->getName(); } But I can't figure out the correct syntax in the template. I tried those without luck (both evaluate to true everytime): <f:if condition="{product.category.offsetExists(category)}">true</f:if> <f:if condition="