mirror of
https://github.com/wallabag/wallabag.git
synced 2024-05-31 23:48:06 +00:00
43 lines
1.1 KiB
PHP
43 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Wallabag\ImportBundle\Controller;
|
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
use Wallabag\ImportBundle\Import\WallabagV2Import;
|
|
|
|
class WallabagV2Controller extends WallabagController
|
|
{
|
|
/**
|
|
* @Route("/wallabag-v2", name="import_wallabag_v2")
|
|
*/
|
|
public function indexAction(Request $request)
|
|
{
|
|
return parent::indexAction($request);
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getImportService()
|
|
{
|
|
$service = $this->get(WallabagV2Import::class);
|
|
|
|
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'));
|
|
}
|
|
|
|
return $service;
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
protected function getImportTemplate()
|
|
{
|
|
return 'WallabagImportBundle:WallabagV2:index.html.twig';
|
|
}
|
|
}
|