File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ Then, define a service for this class:
259259 # app/config/services.yml
260260 services :
261261 # ...
262-
262+
263263 AppBundle\Service\FileUploader :
264264 arguments :
265265 $targetDir : ' %brochures_directory%'
@@ -414,28 +414,15 @@ Now, register this class as a Doctrine listener:
414414
415415 // app/config/services.php
416416 use AppBundle\EventListener\BrochureUploaderListener;
417- <<<<<<< HEAD
418- use Symfony\C omponent\D ependencyInjection\R eference;
419-
420- // ...
421- $container->register('app.doctrine_brochure_listener', BrochureUploaderListener::class)
422- ->addArgument(new Reference('brochures_directory'))
423- =======
424417
425418 $container->autowire(BrochureUploaderListener::class)
426- >>>>>>> 8974c4842... Going through more chapters to use types and autowiring
427419 ->addTag('doctrine.event_listener', array(
428420 'event' => 'prePersist',
429421 ))
430422 ->addTag('doctrine.event_listener', array(
431- <<<<<<< HEAD
432- 'event' => 'prePersist',
433- ));
434- =======
435423 'event' => 'preUpdate',
436424 ))
437425 ;
438- >>>>>>> 8974c4842... Going through more chapters to use types and autowiring
439426
440427 This listener is now automatically executed when persisting a new Product
441428entity. This way, you can remove everything related to uploading from the
You can’t perform that action at this time.
0 commit comments