Quantcast
Channel: Symfony2 Using an Entity Manager within Twig extension - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by Elnur Abdurrakhimov for Symfony2 Using an Entity Manager within...

Making entities aware of any services — including entity managers — is a bad practice. There's nothing wrong about injecting an EM into a Twig extension. Although, I'd rather inject a model manager to...

View Article



Symfony2 Using an Entity Manager within Twig extension

I'm creating a menu system using the Tree Doctrine extenion and I want to create a Twig extension to display the menu based on the requested parent node e.g. {% display_menu(side_menu) %}. This...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images