File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414use Brotkrueml \CodeHighlight \Extension ;
1515use Symfony \Component \DependencyInjection \Attribute \Autoconfigure ;
1616use TYPO3 \CMS \Core \Localization \LanguageService ;
17+ use TYPO3 \CMS \Core \Localization \LanguageServiceFactory ;
1718
1819/**
1920 * @internal
2021 */
2122#[Autoconfigure(public: true )]
22- final class ProgrammingLanguages
23+ final readonly class ProgrammingLanguages
2324{
24- /**
25- * @var LanguageService
26- */
27- private $ languageService ;
25+ private LanguageService $ languageService ;
2826
29- public function __construct (? LanguageService $ languageService = null )
27+ public function __construct (LanguageServiceFactory $ languageServiceFactory )
3028 {
31- $ this ->languageService = $ languageService ?? $ GLOBALS ['LANG ' ] ;
29+ $ this ->languageService = $ languageServiceFactory -> createFromUserPreferences ( $ GLOBALS ['BE_USER ' ]) ;
3230 }
3331
3432 public function getTcaItems (array &$ config ): void
You can’t perform that action at this time.
0 commit comments