]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/ImportBundle/Controller/WallabagV1Controller.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Controller / WallabagV1Controller.php
CommitLineData
b1d05721
JB
1<?php
2
3namespace Wallabag\ImportBundle\Controller;
4
b1d05721
JB
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Component\HttpFoundation\Request;
b1d05721 7
b787a775 8class WallabagV1Controller extends WallabagController
b1d05721 9{
f808b016
JB
10 /**
11 * @Route("/wallabag-v1", name="import_wallabag_v1")
12 */
13 public function indexAction(Request $request)
14 {
15 return parent::indexAction($request);
16 }
17
b1d05721 18 /**
b787a775 19 * {@inheritdoc}
b1d05721 20 */
b787a775 21 protected function getImportService()
b1d05721 22 {
c98db1b6
JB
23 $service = $this->get('wallabag_import.wallabag_v1.import');
24
b3437d58
JB
25 if ($this->get('craue_config')->get('import_with_rabbitmq')) {
26 $service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
27 } elseif ($this->get('craue_config')->get('import_with_redis')) {
28 $service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
c98db1b6
JB
29 }
30
31 return $service;
b787a775 32 }
b1d05721 33
b787a775
JB
34 /**
35 * {@inheritdoc}
36 */
37 protected function getImportTemplate()
38 {
39 return 'WallabagImportBundle:WallabagV1:index.html.twig';
40 }
b1d05721 41}