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 ArticleSymfony2 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
More Pages to Explore .....