diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-09-21 17:47:47 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-25 12:29:18 +0200 |
commit | 59201088b4fc13fd361238396f630dabd9bd1990 (patch) | |
tree | 2d4d5c2fbe7f007214c41f0c4ccba2f8d3d7ec8b /src/Wallabag/ImportBundle/Controller/ChromeController.php | |
parent | f7c55b38122cc593c2b58bb6425fca9d243b055e (diff) | |
download | wallabag-59201088b4fc13fd361238396f630dabd9bd1990.tar.gz wallabag-59201088b4fc13fd361238396f630dabd9bd1990.tar.zst wallabag-59201088b4fc13fd361238396f630dabd9bd1990.zip |
bring chrome and firefox as separate imports
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller/ChromeController.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/ChromeController.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/ChromeController.php b/src/Wallabag/ImportBundle/Controller/ChromeController.php new file mode 100644 index 00000000..e4cc322a --- /dev/null +++ b/src/Wallabag/ImportBundle/Controller/ChromeController.php | |||
@@ -0,0 +1,41 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\ImportBundle\Controller; | ||
4 | |||
5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
6 | use Symfony\Component\HttpFoundation\Request; | ||
7 | |||
8 | class ChromeController extends BrowserController | ||
9 | { | ||
10 | /** | ||
11 | * {@inheritdoc} | ||
12 | */ | ||
13 | protected function getImportService() | ||
14 | { | ||
15 | $service = $this->get('wallabag_import.chrome.import'); | ||
16 | |||
17 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { | ||
18 | $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer')); | ||
19 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
20 | $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1')); | ||
21 | } | ||
22 | |||
23 | return $service; | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * {@inheritdoc} | ||
28 | */ | ||
29 | protected function getImportTemplate() | ||
30 | { | ||
31 | return 'WallabagImportBundle:Chrome:index.html.twig'; | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * @Route("/chrome", name="import_chrome") | ||
36 | */ | ||
37 | public function indexAction(Request $request) | ||
38 | { | ||
39 | return parent::indexAction($request); | ||
40 | } | ||
41 | } | ||