‪TYPO3CMS  10.4
SlotReplacement.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
29 use ‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher as SignalSlotDispatcher;
30 
39 {
43  protected ‪$signalSlotDispatcher;
44 
45  public function ‪__construct(SignalSlotDispatcher ‪$signalSlotDispatcher)
46  {
47  $this->signalSlotDispatcher = ‪$signalSlotDispatcher;
48  }
49 
51  {
52  $this->signalSlotDispatcher->dispatch(
53  SystemInformationToolbarItem::class,
54  'getSystemInformation',
55  [$event->‪getToolbarItem()]
56  );
57  $this->signalSlotDispatcher->dispatch(
58  SystemInformationToolbarItem::class,
59  'loadMessages',
60  [$event->‪getToolbarItem()]
61  );
62  }
63 
65  {
66  $this->signalSlotDispatcher->dispatch(
67  UsernamePasswordLoginProvider::class,
68  'getPageRenderer',
69  [$event->‪getPageRenderer()]
70  );
71  }
72 
74  {
75  $this->signalSlotDispatcher->dispatch(
76  EditDocumentController::class,
77  'preInitAfter',
78  [$event->‪getController(), 'request' => $event->‪getRequest()]
79  );
80  }
81 
83  {
84  $this->signalSlotDispatcher->dispatch(
85  EditDocumentController::class,
86  'initAfter',
87  [$event->‪getController(), 'request' => $event->‪getRequest()]
88  );
89  }
90 
92  {
93  $rootLine = $event->‪getRootLine();
94  $page = end($rootLine);
95  $signalArguments = $this->signalSlotDispatcher->dispatch(
96  BackendUtility::class,
97  'getPagesTSconfigPreInclude',
98  [$event->‪getTsConfig(), (int)$page['uid'], $rootLine, false]
99  );
100  $event->‪setTsConfig($signalArguments[0]);
101  }
102 }
‪TYPO3\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent\getTsConfig
‪getTsConfig()
Definition: ModifyLoadedPageTsConfigEvent.php:39
‪TYPO3\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent\setTsConfig
‪setTsConfig(array $tsConfig)
Definition: ModifyLoadedPageTsConfigEvent.php:49
‪TYPO3\CMS\Backend\Compatibility
Definition: SlotReplacement.php:18
‪TYPO3\CMS\Backend\LoginProvider\Event\ModifyPageLayoutOnLoginProviderSelectionEvent
Definition: ModifyPageLayoutOnLoginProviderSelectionEvent.php:26
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\emitGetPagesTSconfigPreIncludeSignalBackendUtility
‪emitGetPagesTSconfigPreIncludeSignalBackendUtility(ModifyLoadedPageTsConfigEvent $event)
Definition: SlotReplacement.php:90
‪TYPO3\CMS\Backend\Backend\Event\SystemInformationToolbarCollectorEvent
Definition: SystemInformationToolbarCollectorEvent.php:27
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\$signalSlotDispatcher
‪SignalSlotDispatcher $signalSlotDispatcher
Definition: SlotReplacement.php:42
‪TYPO3\CMS\Backend\Controller\Event\AfterFormEnginePageInitializedEvent\getRequest
‪getRequest()
Definition: AfterFormEnginePageInitializedEvent.php:47
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\onSystemInformationToolbarEvent
‪onSystemInformationToolbarEvent(SystemInformationToolbarCollectorEvent $event)
Definition: SlotReplacement.php:49
‪TYPO3\CMS\Backend\Controller\Event\BeforeFormEnginePageInitializedEvent\getRequest
‪getRequest()
Definition: BeforeFormEnginePageInitializedEvent.php:47
‪TYPO3\CMS\Backend\Controller\Event\AfterFormEnginePageInitializedEvent
Definition: AfterFormEnginePageInitializedEvent.php:27
‪TYPO3\CMS\Backend\Controller\EditDocumentController
Definition: EditDocumentController.php:67
‪TYPO3\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent\getRootLine
‪getRootLine()
Definition: ModifyLoadedPageTsConfigEvent.php:54
‪TYPO3\CMS\Backend\LoginProvider\Event\ModifyPageLayoutOnLoginProviderSelectionEvent\getPageRenderer
‪getPageRenderer()
Definition: ModifyPageLayoutOnLoginProviderSelectionEvent.php:56
‪TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem
Definition: SystemInformationToolbarItem.php:38
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\onLoginProviderGetPageRenderer
‪onLoginProviderGetPageRenderer(ModifyPageLayoutOnLoginProviderSelectionEvent $event)
Definition: SlotReplacement.php:63
‪TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider
Definition: UsernamePasswordLoginProvider.php:29
‪TYPO3\CMS\Backend\Controller\Event\BeforeFormEnginePageInitializedEvent
Definition: BeforeFormEnginePageInitializedEvent.php:27
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Backend\Controller\Event\AfterFormEnginePageInitializedEvent\getController
‪getController()
Definition: AfterFormEnginePageInitializedEvent.php:42
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement
Definition: SlotReplacement.php:39
‪TYPO3\CMS\Core\Configuration\Event\ModifyLoadedPageTsConfigEvent
Definition: ModifyLoadedPageTsConfigEvent.php:24
‪TYPO3\CMS\Backend\Backend\Event\SystemInformationToolbarCollectorEvent\getToolbarItem
‪getToolbarItem()
Definition: SystemInformationToolbarCollectorEvent.php:37
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\onPreInitEditDocumentController
‪onPreInitEditDocumentController(BeforeFormEnginePageInitializedEvent $event)
Definition: SlotReplacement.php:72
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\__construct
‪__construct(SignalSlotDispatcher $signalSlotDispatcher)
Definition: SlotReplacement.php:44
‪TYPO3\CMS\Backend\Compatibility\SlotReplacement\onInitEditDocumentController
‪onInitEditDocumentController(AfterFormEnginePageInitializedEvent $event)
Definition: SlotReplacement.php:81
‪TYPO3\CMS\Backend\Controller\Event\BeforeFormEnginePageInitializedEvent\getController
‪getController()
Definition: BeforeFormEnginePageInitializedEvent.php:42
‪TYPO3\CMS\Extbase\SignalSlot\Dispatcher
Definition: Dispatcher.php:126