-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
If you have for example "Item" entity with many to one relation between them and "Group" entity. In "Item" entity "group" parameter represents "Group" entity where it belongs with getter "getGroup" and setter "setGroup". "Group" consists "title" parameter with getter "getTitle" and setter "setTitle"
In controller for example you find one item with item id and pass that item to twig template as variable "item". In "item" object "group" parameter is now doctrine proxy object.
If you try to do this in twig template
{{ item.group.title }}
you will get this error
Twig_Error_Runtime: Item "title" for "Array" does not exist in "<some_twig_template>" at line <some_line>
Only parameter that twig can access in "item.group" object is "isInitialized".
Metadata
Metadata
Assignees
Labels
No labels