forked from Leuchtfeuer/typo3-secure-downloads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
30 lines (28 loc) · 1.34 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function ($extensionKey) {
// Register the backend module if the log option is set in extension configuration
if ((new \Leuchtfeuer\SecureDownloads\Domain\Transfer\ExtensionConfiguration())->isLog()) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
$extensionKey,
'web',
'TrafficLog',
'10',
[
\Leuchtfeuer\SecureDownloads\Controller\LogController::class => 'show,list',
], [
'access' => 'user,group',
'icon' => 'EXT:secure_downloads/Resources/Public/Icons/Extension.svg',
'labels' => 'LLL:EXT:secure_downloads/Resources/Private/Language/locallang_log.xlf',
]
);
}
// Create resource storage
if ((new \Leuchtfeuer\SecureDownloads\Domain\Transfer\ExtensionConfiguration())->isCreateFileStorage()) {
$storageRepositoryClass = \Leuchtfeuer\SecureDownloads\Domain\Repository\StorageRepository::class;
$storageRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($storageRepositoryClass);
$storageRepository->createSecureDownloadStorage();
}
}, 'secure_downloads'
);