Question

I read this doc in order to understand how the doctrine uploadable extension works so I can use it in my Symfony projects.

The problem is at the usage example, where I see an object called $listener and I really can not figure out where does it come from.

I intend to use a similar piece of code in one of my controllers, but I don't know to instantiate that listener, or where to grab it from.

Was it helpful?

Solution

If you look into the github project in question, you can see that they have a documentation in how to install and use them with symfony 2: Install Gedmo Doctrine2 extensions in Symfony2

And if you don't want to do the hard work, there is also a pre-made bundle: Integration bundle for DoctrineExtensions by l3pp4rd in Symfony2 (documentation)

Please note that while the bundle should be easier to install, it is made by a third party, not by the extensions developer, and it might not be as up to date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top