move supported languages logic to service (#2701)

This commit is contained in:
Kevin Papst
2021-08-07 01:11:42 +02:00
committed by GitHub
parent cefd747e91
commit 3a7dba437c
7 changed files with 130 additions and 74 deletions

View File

@@ -35,8 +35,8 @@ services:
security.user.provider.chain:
class: App\Security\KimaiUserProvider
App\EventSubscriber\RedirectToLocaleSubscriber:
arguments: ['@router', '%app_locales%', '%locale%']
App\Utils\LanguageService:
arguments: ['%app_locales%']
App\Repository\WidgetRepository:
arguments:
@@ -105,13 +105,6 @@ services:
arguments:
- !service { class: PDO, factory: ['@database_connection', 'getWrappedConnection'] }
# ================================================================================
# FORMS
# ================================================================================
App\Form\Type\LanguageType:
arguments: ['%app_locales%']
# ================================================================================
# THEME
# ================================================================================
@@ -152,7 +145,7 @@ services:
# ================================================================================
App\Ldap\LdapAuthenticationProvider:
arguments: ['@App\Security\UserChecker', '', '', '', '@App\Configuration\LdapConfiguration', '%security.authentication.hide_user_not_found%']
arguments: ['@App\Security\UserChecker', '', '', '', '@App\Configuration\LdapConfiguration']
# ================================================================================
# REPOSITORIES