--- /dev/null
+<?php
+
+namespace Wallabag\ImportBundle\Controller;
+
+use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
+
+class ImportController extends Controller
+{
+ /**
+ * @Route("/import", name="import")
+ */
+ public function importAction()
+ {
+ return $this->render('WallabagImportBundle:Import:index.html.twig', array());
+ }
+}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
-use Wallabag\ImportBundle\Import\PocketImport;
class PocketController extends Controller
{
/**
- * @Route("/import", name="import")
+ * @Route("/import/pocket", name="pocket")
*/
- public function importAction()
+ public function indexAction()
{
return $this->render('WallabagImportBundle:Pocket:index.html.twig', array());
}
/**
- * @Route("/auth-pocket", name="authpocket")
+ * @Route("/import/pocket/auth", name="authpocket")
*/
public function authAction()
{
}
/**
- * @Route("/callback-pocket", name="callbackpocket")
+ * @Route("/import/pocket/callback", name="callbackpocket")
*/
public function callbackAction()
{
interface ImportInterface
{
+ public function getName();
+ public function getDescription();
public function oAuthRequest($redirectUri, $callbackUri);
public function oAuthAuthorize();
public function import($accessToken);
$this->consumerKey = $consumerKey;
}
+ public function getName()
+ {
+ return 'Pocket';
+ }
+
+ public function getDescription()
+ {
+ return 'This importer will import all your <a href="https://getpocket.com">Pocket</a> data.';
+ }
+
/**
* Create a new Client.
*
--- /dev/null
+{% extends "WallabagCoreBundle::layout.html.twig" %}
+{% block title %}{% trans %}import{% endtrans %}{% endblock %}
+
+{% block content %}
+
+<div class="row">
+ <div class="col s12">
+ <div class="card-panel settings">
+ {% trans %}Welcome on wallabag importer. Please select your previous service that you want to migrate.{% endtrans %}
+ <ul>
+ <li><a href="{{ path('pocket') }}">Pocket</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+{% endblock %}