forked from schmitzal/tinyimg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
29 lines (25 loc) · 1.01 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
<?php
defined('TYPO3_MODE') or die();
if (TYPO3_MODE === 'BE') {
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
// Register slot when a file has been added
$signalSlotDispatcher->connect(
\TYPO3\CMS\Core\Resource\ResourceStorage::class,
'postFileAdd',
\Schmitzal\Tinyimg\Service\CompressImageService::class,
'initializeCompression',
true
);
// Register slot when a file has been replaced
$signalSlotDispatcher->connect(
\TYPO3\CMS\Core\Resource\ResourceStorage::class,
'postFileReplace',
\Schmitzal\Tinyimg\Service\CompressImageService::class,
'initializeCompression',
true
);
// Register command
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][$_EXTKEY] =
\Schmitzal\Tinyimg\Command\CompressImagesCommandController::class;
}