forked from beechit/fal_securedownload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
95 lines (84 loc) · 4.12 KB
/
ext_localconf.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'BeechIt.' . $_EXTKEY,
'Filetree',
array(
'FileTree' => 'tree',
),
// non-cacheable actions
array(
'FileTree' => 'tree',
)
);
// FE FileTree leaf open/close state dispatcher
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['FalSecuredownloadFileTreeState'] =
'EXT:fal_securedownload/Resources/Public/Php/FileTreeState.php';
// FileDumpEID hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['FileDumpEID.php']['checkFileAccess']['FalSecuredownload'] =
'BeechIt\\FalSecuredownload\\Hooks\\FileDumpHook';
// Resource Icon hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_iconworks.php']['overrideResourceIcon']['FalSecuredownload'] =
'BeechIt\\FalSecuredownload\\Hooks\\IconUtilityHook';
if (TYPO3_MODE === 'BE') {
// Public url rendering in BE context
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PreGeneratePublicUrl,
'BeechIt\\FalSecuredownload\\Aspects\\PublicUrlAspect',
'generatePublicUrl'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerAjaxHandler (
'FalSecuredownload::publicUrl',
'BeechIt\\FalSecuredownload\\Controller\\BePublicUrlController->dumpFile'
);
// Page module hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['falsecuredownload_filetree'][$_EXTKEY] =
'BeechIt\\FalSecuredownload\\Hooks\\CmsLayout->getExtensionSummary';
// Add FolderPermission button to docheader of filelist
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/template.php']['docHeaderButtonsHook']['FalSecuredownload'] =
'BeechIt\\FalSecuredownload\\Hooks\\DocHeaderButtonsHook->addFolderPermissionsButton';
// refresh file tree after change in tx_falsecuredownload_folder record
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
'BeechIt\\FalSecuredownload\\Hooks\\ProcessDatamapHook';
$GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] =
'BeechIt\\FalSecuredownload\\Hooks\\ProcessDatamapHook';
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PreFolderMove,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'preFolderMove'
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderMove,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'postFolderMove'
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PreFolderDelete,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'preFolderDelete'
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderDelete,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'postFolderDelete'
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PreFolderRename,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'preFolderRename'
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect(
'TYPO3\\CMS\\Core\\Resource\\ResourceStorage',
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderRename,
'BeechIt\\FalSecuredownload\\Hooks\\FolderChangedSlot',
'postFolderRename'
);
}