Use doctrine event to download images

This commit is contained in:
Jeremy Benoist
2016-10-30 10:48:29 +01:00
parent 45fd7e09d7
commit 7f55941856
6 changed files with 401 additions and 132 deletions

View File

@ -136,3 +136,22 @@ services:
- "@doctrine"
tags:
- { name: doctrine.event_subscriber }
wallabag_core.subscriber.download_images:
class: Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber
arguments:
- "@wallabag_core.entry.download_images"
- "%craue_config.config.class%"
- "@logger"
tags:
- { name: doctrine.event_subscriber }
wallabag_core.entry.download_images:
class: Wallabag\CoreBundle\Helper\DownloadImages
arguments:
- "@wallabag_core.entry.download_images.client"
- "%kernel.root_dir%/../web/assets/images"
- "@logger"
wallabag_core.entry.download_images.client:
class: GuzzleHttp\Client