This repository has been archived by the owner on May 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathext_localconf.php
76 lines (68 loc) · 3.66 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
<?php
defined('TYPO3_MODE') || die();
$boot = function ($_EXTKEY) {
/* ===========================================================================
Extbase-based plugin
=========================================================================== */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Causal.' . $_EXTKEY,
'Filelist',
// cacheable actions
[
'File' => 'list',
],
// non-cacheable actions
[]
);
/* ===========================================================================
Web > Page hook
=========================================================================== */
$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
$pluginSignature = strtolower($extensionName) . '_filelist';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$pluginSignature][$_EXTKEY] =
\Causal\FileList\Hooks\PageLayoutView::class . '->getExtensionSummary';
/* ===========================================================================
File > Filelist signals
=========================================================================== */
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$listenSignals = [
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileAdd,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileCopy,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileMove,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileRename,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileReplace,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileCreate,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileDelete,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFileSetContents,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderAdd,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderCopy,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderMove,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderRename,
\TYPO3\CMS\Core\Resource\ResourceStorageInterface::SIGNAL_PostFolderDelete,
];
foreach ($listenSignals as $signal) {
$signalSlotDispatcher->connect(
\TYPO3\CMS\Core\Resource\ResourceStorage::class,
$signal,
\Causal\FileList\Slots\ResourceStorage::class,
$signal
);
}
/* ===========================================================================
Register default template layouts
=========================================================================== */
$GLOBALS['TYPO3_CONF_VARS']['EXT']['file_list']['templateLayouts'][] = [
'LLL:EXT:file_list/Resources/Private/Language/locallang_flexform.xlf:filelist.templateLayout.simple',
'Simple',
];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['file_list']['templateLayouts'][] = [
'LLL:EXT:file_list/Resources/Private/Language/locallang_flexform.xlf:filelist.templateLayout.thumbnailDescription',
'ThumbnailDescription',
];
if (TYPO3_MODE === 'BE') {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][$_EXTKEY] = \Causal\FileList\Hooks\DataHandler::class;
}
};
$boot($_EXTKEY);
unset($boot);