This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
60 lines (54 loc) · 2.29 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
<?php
/**
* lazyFxx: Lazy Loading Effects
*
* Using the image processing framework of TYPO3 to create placeholder images.
*
* @author
* brainworXX GmbH <[email protected]>
*
* @license
* http://opensource.org/licenses/LGPL-2.1
*
* GNU Lesser General Public License Version 2.1
*
* lazyFxx Copyright (C) 2017-2020 Brainworxx GmbH
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$boot = function () {
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
// Store the settings. We use them all over the place.
\Brainworxx\Lazyfxx\Tool\Box::setSettings(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
)->get('lazyfxx'));
// Check for '1'. For some reason we get a 'true' string, in case we have no data.
if (\Brainworxx\Lazyfxx\Tool\Box::getSettings()['useXclasses'] === '1') {
// X-Classing the image viewhelper.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper::class] = [
'className' => Brainworxx\Lazyfxx\Xclass\ImageViewHelper::class
];
// X-Classing the image viewhelper.
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Fluid\ViewHelpers\MediaViewHelper::class] = [
'className' => Brainworxx\Lazyfxx\Xclass\MediaViewHelper::class
];
}
};
$boot();
unset($boot);