]>
Commit | Line | Data |
---|---|---|
59201088 TC |
1 | <?php |
2 | ||
3 | namespace Wallabag\ImportBundle\Controller; | |
4 | ||
59201088 | 5 | use Symfony\Component\HttpFoundation\Request; |
115de64e | 6 | use Symfony\Component\Routing\Annotation\Route; |
59201088 TC |
7 | |
8 | class FirefoxController extends BrowserController | |
9 | { | |
f808b016 JB |
10 | /** |
11 | * @Route("/firefox", name="import_firefox") | |
12 | */ | |
13 | public function indexAction(Request $request) | |
14 | { | |
15 | return parent::indexAction($request); | |
16 | } | |
17 | ||
59201088 TC |
18 | /** |
19 | * {@inheritdoc} | |
20 | */ | |
21 | protected function getImportService() | |
22 | { | |
23 | $service = $this->get('wallabag_import.firefox.import'); | |
24 | ||
25 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { | |
2c61db30 | 26 | $service->setProducer($this->get('old_sound_rabbit_mq.import_firefox_producer')); |
59201088 | 27 | } elseif ($this->get('craue_config')->get('import_with_redis')) { |
2c61db30 | 28 | $service->setProducer($this->get('wallabag_import.producer.redis.firefox')); |
59201088 TC |
29 | } |
30 | ||
31 | return $service; | |
32 | } | |
33 | ||
34 | /** | |
35 | * {@inheritdoc} | |
36 | */ | |
37 | protected function getImportTemplate() | |
38 | { | |
39 | return 'WallabagImportBundle:Firefox:index.html.twig'; | |
40 | } | |
59201088 | 41 | } |