X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FController%2FDeveloperController.php;h=d85ba5ee4a30d82bb6ac8733daf22d7a8fd06bfe;hb=389d55f86b962a448d7a5052a5c0cf438d161c41;hp=e5cfd83c656b67209d3f78d87ae3b5d56543729f;hpb=0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php index e5cfd83c..d85ba5ee 100644 --- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php +++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php @@ -21,9 +21,9 @@ class DeveloperController extends Controller { $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll(); - return $this->render('WallabagCoreBundle:Developer:index.html.twig', array( + return $this->render('WallabagCoreBundle:Developer:index.html.twig', [ 'clients' => $clients, - )); + ]); } /** @@ -43,24 +43,24 @@ class DeveloperController extends Controller $clientForm->handleRequest($request); if ($clientForm->isValid()) { - $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token')); + $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']); $em->persist($client); $em->flush(); $this->get('session')->getFlashBag()->add( 'notice', - 'New client created.' + 'flashes.developer.notice.client_created' ); - return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', array( + return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [ 'client_id' => $client->getPublicId(), 'client_secret' => $client->getSecret(), - )); + ]); } - return $this->render('WallabagCoreBundle:Developer:client.html.twig', array( + return $this->render('WallabagCoreBundle:Developer:client.html.twig', [ 'form' => $clientForm->createView(), - )); + ]); } /** @@ -80,7 +80,7 @@ class DeveloperController extends Controller $this->get('session')->getFlashBag()->add( 'notice', - 'Client deleted' + 'flashes.developer.notice.client_deleted' ); return $this->redirect($this->generateUrl('developer'));