2 declare(strict_types = 1);
19 use Psr\Http\Message\ServerRequestInterface;
36 return 'apps-toolbar-menu-cache';
44 $view = GeneralUtility::makeInstance(StandaloneView::class);
45 $templateNameAndPath =
'EXT:adminpanel/Resources/Private/Templates/Modules/Settings/Cache.html';
46 $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
47 $view->setPartialRootPaths([
'EXT:adminpanel/Resources/Private/Partials']);
49 $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
52 $view->assignMultiple(
54 'isEnabled' => $this->
getBackendUser()->uc[
'AdminPanel'][
'display_cache'],
55 'noCache' => $this->
getBackendUser()->uc[
'AdminPanel'][
'cache_noCache'],
57 'clearPageCacheUrl' => $feCacheClear ? (
string)$uriBuilder->buildUriFromRoute(
'tce_db', [
'cacheCmd' =>
'pages']) :
'',
58 'clearCurrentPageCacheUrl' => (
string)$uriBuilder->buildUriFromRoute(
61 'cacheCmd' => $this->getTypoScriptFrontendController()->id,
67 return $view->render();
83 $locallangFileAndPath =
'LLL:EXT:adminpanel/Resources/Private/Language/locallang_cache.xlf:module.label';
92 if ($this->configurationService->getConfigurationOption(
'cache',
'noCache')) {
110 return [
'EXT:adminpanel/Resources/Public/JavaScript/Modules/Cache.js'];