mirror of
https://github.com/wallabag/wallabag.git
synced 2024-04-29 16:08:44 +00:00
6aca334d53
Mostly using autowiring to inject deps. The only tricky part was for import because all producer use the same class and have a different alias. So we must write them down in the service definition, autowiring doesn't work in that case. Usually: - if a controller has a constructor, it means injected services are at least re-used once in actions - otherwise, service are injected per action
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
class StaticController extends Controller
|
|
{
|
|
/**
|
|
* @Route("/howto", name="howto")
|
|
*/
|
|
public function howtoAction()
|
|
{
|
|
$addonsUrl = $this->getParameter('addons_url');
|
|
|
|
return $this->render(
|
|
'@WallabagCore/Static/howto.html.twig',
|
|
[
|
|
'addonsUrl' => $addonsUrl,
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @Route("/about", name="about")
|
|
*/
|
|
public function aboutAction()
|
|
{
|
|
return $this->render(
|
|
'@WallabagCore/Static/about.html.twig',
|
|
[
|
|
'version' => $this->getParameter('wallabag_core.version'),
|
|
'paypal_url' => $this->getParameter('wallabag_core.paypal_url'),
|
|
]
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @Route("/quickstart", name="quickstart")
|
|
*/
|
|
public function quickstartAction()
|
|
{
|
|
return $this->render(
|
|
'@WallabagCore/Static/quickstart.html.twig'
|
|
);
|
|
}
|
|
}
|