1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-27 17:28:39 +00:00

Use FQCN instead of service alias

This commit is contained in:
Yassine Guedidi 2022-08-28 02:01:46 +02:00
parent 156158673f
commit eb43c78720
62 changed files with 579 additions and 404 deletions

View file

@ -4,7 +4,9 @@ namespace Wallabag\ApiBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
use Wallabag\ApiBundle\Entity\Client;
use Wallabag\ApiBundle\Form\Type\ClientType;
@ -45,9 +47,9 @@ class DeveloperController extends Controller
$em->persist($client);
$em->flush();
$this->get('session')->getFlashBag()->add(
$this->get(SessionInterface::class)->getFlashBag()->add(
'notice',
$this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
$this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
);
return $this->render('@WallabagCore/themes/common/Developer/client_parameters.html.twig', [
@ -79,9 +81,9 @@ class DeveloperController extends Controller
$em->remove($client);
$em->flush();
$this->get('session')->getFlashBag()->add(
$this->get(SessionInterface::class)->getFlashBag()->add(
'notice',
$this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
$this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
);
return $this->redirect($this->generateUrl('developer'));