‪TYPO3CMS  10.4
BackendControllerHook.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
22 
28 {
35  public function ‪addJavaScript(array $configuration, ‪BackendController $backendController)
36  {
37  $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
39  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
40  $pageRenderer->addInlineSetting('FileRename', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_rename'));
41  $pageRenderer->addInlineSetting('FileEdit', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_edit'));
42  $pageRenderer->addInlineSetting('FileUpload', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_upload'));
43  $pageRenderer->addInlineSetting('FileCreate', 'moduleUrl', (string)$uriBuilder->buildUriFromRoute('file_newfolder'));
44  }
45 }
‪TYPO3\CMS\Filelist\Hook\BackendControllerHook\addJavaScript
‪addJavaScript(array $configuration, BackendController $backendController)
Definition: BackendControllerHook.php:35
‪TYPO3\CMS\Filelist\Hook
Definition: BackendControllerHook.php:16
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:42
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Backend\Controller\BackendController
Definition: BackendController.php:45
‪TYPO3\CMS\Filelist\Hook\BackendControllerHook
Definition: BackendControllerHook.php:28
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46