Michael
Michael

Reputation: 4876

Doctrine uploadable extension in Symfony

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.

Upvotes: 4

Views: 2719

Answers (1)

Lepidosteus
Lepidosteus

Reputation: 12037

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.

Upvotes: 3

Related Questions