forked from typo3-themes/themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
executable file
·48 lines (42 loc) · 1.55 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
/*
* Add page typoscript for new content element wizard
*/
$tsconfig = '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:themes/Configuration/PageTS/tsconfig.typoscript">';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig($tsconfig);
/*
* Register hook to inject themes
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['KayStrobach\\Themes\\Domain\\Repository\\ThemeRepository']['init'][]
= 'KayStrobach\\Themes\\Hooks\\ThemesDomainRepositoryThemeRepositoryInitHook->init';
/*
* register used hooks to inject the TS
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tstemplate.php']['includeStaticTypoScriptSourcesAtEnd'][]
= \KayStrobach\Themes\Hooks\T3libTstemplateIncludeStaticTypoScriptSourcesAtEndHook::class . '->main';
/**
* register signal to inject pagets without xclassing
* Requires signal slot call from http://forge.typo3.org/issues/59703.
*
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
*/
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');
$signalSlotDispatcher->connect(
\TYPO3\CMS\Backend\Utility\BackendUtility::class,
'getPagesTSconfigPreInclude',
\KayStrobach\Themes\Slots\BackendUtilitySlot::class,
'getPagesTsConfigPreInclude'
);
unset($signalSlotDispatcher);
/*
* register frontend plugin to allow usage of extbase controller
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'KayStrobach.themes',
'Theme',
['Theme' => 'index'],
[]
);