]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/config/services.yml
Use doctrine event to download images
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / config / services.yml
index 4b7751fe9efeb8bb756fc26a6bd4dd49730b9489..1fb81a46104db878fe379695abf846cecb0f3e55 100644 (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