Skip to content

Commit

Permalink
Prevent auto clean-up the file
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroemkenjw committed Jun 17, 2024
1 parent dfe2926 commit 04fd5d5
Showing 1 changed file with 13 additions and 30 deletions.
43 changes: 13 additions & 30 deletions Classes/Controller/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
class ModuleController extends ActionController
{
private int $pageUid;
/** @var array<string, mixed> */
/** @var array<string, mixed> */
private array $exampleConfig;

public function __construct(
Expand All @@ -65,8 +65,7 @@ public function __construct(
protected readonly ConnectionPool $connectionPool,
protected readonly TableInformationService $tableInformationService,
private readonly LoggerInterface $logger,
) {
}
) {}

/**
* Renders the list of all possible flash messages
Expand Down Expand Up @@ -245,7 +244,6 @@ public function clipboardAction(

/**
* Debugs the content of the clipboard
*
* @return array<string, mixed>
*/
protected function getClipboard(string $identifier): array
Expand All @@ -265,7 +263,6 @@ protected function getClipboard(string $identifier): array

/**
* Debugs the content of the clipboard
*
* @return array<string, mixed>
*/
protected function getCurrentClipboard(): array
Expand Down Expand Up @@ -587,37 +584,27 @@ protected function initializeModuleTemplate(
'flash' => [
'controller' => 'Module',
'action' => 'flash',
'label' => $this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.flash'
),
'label' => $this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.flash'),
],
'tree' => [
'controller' => 'Module',
'action' => 'tree',
'label' => $this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.tree'
),
'label' => $this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.tree'),
],
'clipboard' => [
'controller' => 'Module',
'action' => 'clipboard',
'label' => $this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.clipboard'
),
'label' => $this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.clipboard'),
],
'links' => [
'controller' => 'Module',
'action' => 'links',
'label' => $this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.links'
),
'label' => $this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.links'),
],
'fileReference' => [
'controller' => 'Module',
'action' => 'fileReference',
'label' => $this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.fileReference'
),
'label' => $this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang.xlf:module.menu.fileReference'),
],
];
$view = $this->moduleTemplateFactory->create($request);
Expand All @@ -630,13 +617,11 @@ protected function initializeModuleTemplate(
$isActive = $this->request->getControllerActionName() === $menuItemConfig['action'];
$menuItem = $menu->makeMenuItem()
->setTitle($menuItemConfig['label'])
->setHref(
$this->uriBuilder->reset()->uriFor(
$menuItemConfig['action'],
[],
$menuItemConfig['controller'],
)
)
->setHref($this->uriBuilder->reset()->uriFor(
$menuItemConfig['action'],
[],
$menuItemConfig['controller'],
))
->setActive($isActive);
$menu->addMenuItem($menuItem);
if ($isActive) {
Expand All @@ -647,9 +632,7 @@ protected function initializeModuleTemplate(
$view->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);

$view->setTitle(
$this->getLanguageService()->sL(
'LLL:EXT:examples/Resources/Private/Language/Module/locallang_mod.xlf:mlang_tabs_tab'
),
$this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang_mod.xlf:mlang_tabs_tab'),
$context,
);

Expand Down

0 comments on commit 04fd5d5

Please sign in to comment.