diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-09-26 14:47:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-26 14:47:02 +0200 |
commit | d6de23a100221ae1afaa92a58af17a17d0c6614e (patch) | |
tree | bd105198c75ea6b8e5d37a80a9f0135942a1c5eb /src/Wallabag/ImportBundle/Controller/FirefoxController.php | |
parent | 7e98ad962680fac17b3b90ae34b9c6e5afe7636f (diff) | |
parent | fefef9d41b4d1bd9efbd49011159bae70bf67528 (diff) | |
download | wallabag-d6de23a100221ae1afaa92a58af17a17d0c6614e.tar.gz wallabag-d6de23a100221ae1afaa92a58af17a17d0c6614e.tar.zst wallabag-d6de23a100221ae1afaa92a58af17a17d0c6614e.zip |
Merge pull request #2192 from wallabag/import-browser-bookmarks
Import Firefox & Chrome bookmarks into wallabag
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller/FirefoxController.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/FirefoxController.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/FirefoxController.php b/src/Wallabag/ImportBundle/Controller/FirefoxController.php new file mode 100644 index 00000000..c329b9c4 --- /dev/null +++ b/src/Wallabag/ImportBundle/Controller/FirefoxController.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 FirefoxController extends BrowserController | ||
9 | { | ||
10 | /** | ||
11 | * {@inheritdoc} | ||
12 | */ | ||
13 | protected function getImportService() | ||
14 | { | ||
15 | $service = $this->get('wallabag_import.firefox.import'); | ||
16 | |||
17 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { | ||
18 | $service->setProducer($this->get('old_sound_rabbit_mq.import_firefox_producer')); | ||
19 | } elseif ($this->get('craue_config')->get('import_with_redis')) { | ||
20 | $service->setProducer($this->get('wallabag_import.producer.redis.firefox')); | ||
21 | } | ||
22 | |||
23 | return $service; | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * {@inheritdoc} | ||
28 | */ | ||
29 | protected function getImportTemplate() | ||
30 | { | ||
31 | return 'WallabagImportBundle:Firefox:index.html.twig'; | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * @Route("/firefox", name="import_firefox") | ||
36 | */ | ||
37 | public function indexAction(Request $request) | ||
38 | { | ||
39 | return parent::indexAction($request); | ||
40 | } | ||
41 | } | ||