File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 1717 * The TYPO3 project - inspiring people to share!
1818 */
1919
20+ use Symfony \Component \Console \Attribute \AsCommand ;
2021use Symfony \Component \Console \Command \Command ;
2122use Symfony \Component \Console \Input \InputInterface ;
2223use Symfony \Component \Console \Output \OutputInterface ;
2930 *
3031 * @package Cobweb\FlushLanguageCache\Command
3132 */
33+ #[AsCommand('languagecache:flush ' , 'Clears the language cache (l10n) ' )]
3234class FlushLanguageCacheCommand extends Command
3335{
3436
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public function __invoke(ModifyClearCacheActionsEvent $event): void
3838 // First check if user has right to access the flush language cache item
3939 $ tsConfig = $ this ->getBackendUser ()->getTSConfig ();
4040 $ option = $ tsConfig ['options. ' ]['clearCache. ' ]['flushLanguageCache ' ] ?? false ;
41- if (( bool ) $ option || $ this ->getBackendUser ()->isAdmin ()) {
41+ if ($ option || $ this ->getBackendUser ()->isAdmin ()) {
4242 $ uriBuilder = GeneralUtility::makeInstance (UriBuilder::class);
4343 try {
4444 $ uri = $ uriBuilder ->buildUriFromRoute ('flushLanguageCache ' );
Original file line number Diff line number Diff line change @@ -8,13 +8,6 @@ services:
88 Cobweb\FlushLanguageCache\ :
99 resource : ' ../Classes/*'
1010
11- Cobweb\FlushLanguageCache\Command\FlushLanguageCacheCommand :
12- tags :
13- - name : ' console.command'
14- command : ' languagecache:flush'
15- description : ' Clears the language cache (l10n).'
16- schedulable : true
17-
1811 Cobweb\FlushLanguageCache\EventListener\ClearCacheListener :
1912 tags :
2013 - name : event.listener
You can’t perform that action at this time.
0 commit comments