wallabag/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php

42 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace Wallabag\ImportBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
class WallabagV2Controller extends WallabagController
{
2017-07-01 07:52:38 +00:00
/**
* @Route("/wallabag-v2", name="import_wallabag_v2")
*/
public function indexAction(Request $request)
{
return parent::indexAction($request);
}
/**
* {@inheritdoc}
*/
protected function getImportService()
{
2016-09-04 19:49:21 +00:00
$service = $this->get('wallabag_import.wallabag_v2.import');
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
$service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v2_producer'));
} elseif ($this->get('craue_config')->get('import_with_redis')) {
$service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v2'));
2016-09-04 19:49:21 +00:00
}
return $service;
}
/**
* {@inheritdoc}
*/
protected function getImportTemplate()
{
return 'WallabagImportBundle:WallabagV2:index.html.twig';
}
}