Skip to content

Commit

Permalink
Merge pull request #568 from deguif/route-attributes
Browse files Browse the repository at this point in the history
Add attributes for routes
  • Loading branch information
goetas committed Dec 12, 2023
2 parents 6724d7b + 65891c6 commit 6a3f801
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Controller/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
*
* @Route("/api")
*/
#[Route('/api')]
class ApiController
{
/**
Expand Down Expand Up @@ -65,6 +66,7 @@ public function __construct(ConfigFactory $configFactory, Updater $updater)
* defaults = {"id" = null},
* options = {"i18n" = false})
*/
#[Route('/configs/{config}/domains/{domain}/locales/{locale}/messages', name: 'jms_translation_update_message', methods: [Request::METHOD_PUT], defaults: ['id' => null], options: ['i18n' => false])]
public function updateMessageAction(Request $request, $config, $domain, $locale)
{
$id = $request->query->get('id');
Expand Down
1 change: 1 addition & 0 deletions Controller/TranslateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function setSourceLanguage($lang)
* @Route("/", name="jms_translation_index", options = {"i18n" = false})
* @Template("@JMSTranslation/Translate/index.html.twig")
*/
#[Route('/', name: 'jms_translation_index', options: ['i18n' => false])]
public function indexAction(Request $request)
{
$configs = $this->configFactory->getNames();
Expand Down

0 comments on commit 6a3f801

Please sign in to comment.