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

43 lines
1.1 KiB
PHP
Raw Normal View History

2015-12-30 12:26:30 +00:00
<?php
namespace Wallabag\ImportBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Wallabag\ImportBundle\Import\WallabagV1Import;
2015-12-30 12:26:30 +00:00
class WallabagV1Controller extends WallabagController
2015-12-30 12:26:30 +00:00
{
2017-07-01 07:52:38 +00:00
/**
* @Route("/wallabag-v1", name="import_wallabag_v1")
*/
public function indexAction(Request $request)
{
return parent::indexAction($request);
}
2015-12-30 12:26:30 +00:00
/**
* {@inheritdoc}
2015-12-30 12:26:30 +00:00
*/
protected function getImportService()
2015-12-30 12:26:30 +00:00
{
$service = $this->get(WallabagV1Import::class);
2016-09-04 19:49:21 +00:00
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
$service->setProducer($this->get('old_sound_rabbit_mq.import_wallabag_v1_producer'));
} elseif ($this->get('craue_config')->get('import_with_redis')) {
$service->setProducer($this->get('wallabag_import.producer.redis.wallabag_v1'));
2016-09-04 19:49:21 +00:00
}
return $service;
}
2015-12-30 12:26:30 +00:00
/**
* {@inheritdoc}
*/
protected function getImportTemplate()
{
return '@WallabagImport/WallabagV1/index.html.twig';
}
2015-12-30 12:26:30 +00:00
}