File tree Expand file tree Collapse file tree 3 files changed +27
-5
lines changed
Classes/Controller/Event/Handler Expand file tree Collapse file tree 3 files changed +27
-5
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace TYPO3 \CMS \FrontendEditing \Controller \Event \Handler ;
6
+
7
+ use TYPO3 \CMS \Core \Core \Event \BootCompletedEvent ;
8
+ use TYPO3 \CMS \Core \Page \PageRenderer ;
9
+
10
+ final class BootCompletedEventHandler
11
+ {
12
+ public function __invoke (BootCompletedEvent $ event ): void
13
+ {
14
+ $ pageRenderer = \TYPO3 \CMS \Core \Utility \GeneralUtility::makeInstance (PageRenderer::class);
15
+ $ path = urldecode (parse_url ($ _SERVER ['REQUEST_URI ' ], PHP_URL_PATH ));
16
+
17
+ if (str_ends_with ($ path , '/browse ' )) {
18
+ $ pageRenderer ->loadRequireJsModule ('TYPO3/CMS/FrontendEditing/ParentWindow ' );
19
+ }
20
+ }
21
+ }
Original file line number Diff line number Diff line change @@ -18,3 +18,9 @@ services:
18
18
- name : event.listener
19
19
identifier : typoScriptPrepareFieldUpdate
20
20
event : TYPO3\CMS\FrontendEditing\Controller\Event\PrepareFieldUpdateEvent
21
+
22
+ TYPO3\CMS\FrontendEditing\Controller\Event\Handler\BootCompletedEventHandler :
23
+ tags :
24
+ - name : event.listener
25
+ identifier : bootCompletedEventHandler
26
+ event : TYPO3\CMS\Core\Core\Event\BootCompletedEvent
Original file line number Diff line number Diff line change 2
2
3
3
defined ('TYPO3 ' ) or die ();
4
4
5
- if (TYPO3_MODE === 'BE ' ) {
6
- // $pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
7
- // $pageRenderer->loadRequireJsModule('TYPO3/CMS/FrontendEditing/ParentWindow');
8
- }
9
-
10
5
// Extend the <core:contentEditable> viewhelper by the one from EXT:frontend_editing
11
6
$ GLOBALS ['TYPO3_CONF_VARS ' ]['SYS ' ]['fluid ' ]['namespaces ' ]['core ' ][] = 'TYPO3 \\CMS \\FrontendEditing \\ViewHelpers ' ;
12
7
You can’t perform that action at this time.
0 commit comments