4

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.

Michael
  • 4,786
  • 11
  • 45
  • 68

1 Answers1

3

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.

Lepidosteus
  • 11,779
  • 4
  • 39
  • 51
  • Yes, I have missed a part of that documentation while focusing on another extension (Translatable - that I am using also from within the bundle). So, there is a service that you get like this - $uploadableManager = $this->get('stof_doctrine_extensions.uploadable.manager'); but it is not declared explicitly in config file like "gedmo.listener.softdeleteable" is, for instance. – Michael Sep 19 '13 at 19:04