]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php
Convert other imports to Rabbit
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Controller / WallabagV1Controller.php
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('rabbitmq')) {
18 $service->setRabbitmqProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
19 }
20
21 return $service;
22 }
23
24 /**
25 * {@inheritdoc}
26 */
27 protected function getImportTemplate()
28 {
29 return 'WallabagImportBundle:WallabagV1:index.html.twig';
30 }
31
32 /**
33 * @Route("/wallabag-v1", name="import_wallabag_v1")
34 */
35 public function indexAction(Request $request)
36 {
37 return parent::indexAction($request);
38 }
39 }