]>
Commit | Line | Data |
---|---|---|
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 WallabagV1Controller extends WallabagController | |
9 | { | |
10 | /** | |
11 | * {@inheritdoc} | |
12 | */ | |
13 | protected function getImportService() | |
14 | { | |
15 | $service = $this->get('wallabag_import.wallabag_v1.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:WallabagV1:index.html.twig'; | |
32 | } | |
33 | ||
34 | /** | |
35 | * @Route("/wallabag-v1", name="import_wallabag_v1") | |
36 | */ | |
37 | public function indexAction(Request $request) | |
38 | { | |
39 | return parent::indexAction($request); | |
40 | } | |
41 | } |