-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #384 from bartmcleod/5.0
Updated many things after testing in actual Symfony 5 project
- Loading branch information
Showing
10 changed files
with
106 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ | |
namespace Lexik\Bundle\TranslationBundle\Controller; | ||
|
||
use Lexik\Bundle\TranslationBundle\Util\Csrf\CsrfCheckerTrait; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\JsonResponse; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* @author Cédric Girard <[email protected]> | ||
*/ | ||
class RestController extends Controller | ||
class RestController extends AbstractController | ||
{ | ||
use CsrfCheckerTrait; | ||
|
||
|
@@ -21,7 +21,7 @@ class RestController extends Controller | |
*/ | ||
public function listAction(Request $request) | ||
{ | ||
list($transUnits, $count) = $this->get('lexik_translation.data_grid.request_handler')->getPage($request); | ||
[$transUnits, $count] = $this->get('lexik_translation.data_grid.request_handler')->getPage($request); | ||
|
||
return $this->get('lexik_translation.data_grid.formatter')->createListResponse($transUnits, $count); | ||
} | ||
|
@@ -34,7 +34,7 @@ public function listAction(Request $request) | |
*/ | ||
public function listByProfileAction(Request $request, $token) | ||
{ | ||
list($transUnits, $count) = $this->get('lexik_translation.data_grid.request_handler')->getPageByToken($request, $token); | ||
[$transUnits, $count] = $this->get('lexik_translation.data_grid.request_handler')->getPageByToken($request, $token); | ||
|
||
return $this->get('lexik_translation.data_grid.formatter')->createListResponse($transUnits, $count); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,14 @@ | |
use Lexik\Bundle\TranslationBundle\Form\Type\TransUnitType; | ||
use Lexik\Bundle\TranslationBundle\Storage\StorageInterface; | ||
use Lexik\Bundle\TranslationBundle\Util\Csrf\CsrfCheckerTrait; | ||
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\JsonResponse; | ||
use Symfony\Component\HttpFoundation\Request; | ||
|
||
/** | ||
* @author Cédric Girard <[email protected]> | ||
*/ | ||
class TranslationController extends Controller | ||
class TranslationController extends AbstractController | ||
{ | ||
use CsrfCheckerTrait; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
lexik_translation_list: | ||
path: /translations | ||
defaults: { _controller: "LexikTranslationBundle:Rest:list" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\RestController:listAction' } | ||
methods: [GET] | ||
|
||
lexik_translation_profiler: | ||
path: /translations/profiler/{token} | ||
defaults: { _controller: "LexikTranslationBundle:Rest:listByProfile" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\RestController:listByProfileAction' } | ||
methods: [GET] | ||
|
||
lexik_translation_update: | ||
path: /translations/{id} | ||
defaults: { _controller: "LexikTranslationBundle:Rest:update" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\RestController:updateAction' } | ||
methods: [PUT] | ||
|
||
lexik_translation_delete_locale: | ||
path: /translations/{id}/{locale} | ||
defaults: { _controller: "LexikTranslationBundle:Rest:deleteTranslation" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\RestController:deleteTranslationAction' } | ||
methods: [DELETE] | ||
|
||
lexik_translation_delete: | ||
path: /translations/{id} | ||
defaults: { _controller: "LexikTranslationBundle:Rest:delete" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\RestController:deleteAction' } | ||
methods: [DELETE] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
lexik_translation_overview: | ||
path: / | ||
defaults: { _controller: "LexikTranslationBundle:Translation:overview" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\TranslationController:overviewAction' } | ||
methods: [GET] | ||
|
||
lexik_translation_grid: | ||
path: /grid | ||
defaults: { _controller: "LexikTranslationBundle:Translation:grid" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\TranslationController:gridAction' } | ||
methods: [GET] | ||
|
||
lexik_translation_new: | ||
path: /new | ||
defaults: { _controller: "LexikTranslationBundle:Translation:new" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\TranslationController:newAction' } | ||
methods: [GET, POST] | ||
|
||
lexik_translation_invalidate_cache: | ||
path: /invalidate-cache | ||
defaults: { _controller: "LexikTranslationBundle:Translation:invalidateCache" } | ||
defaults: { _controller: 'Lexik\Bundle\TranslationBundle\Controller\TranslationController:invalidateCacheAction' } | ||
methods: [GET] |
Oops, something went wrong.