-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
84 lines (70 loc) · 3.2 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
<?php
use AgrosupDijon\BulmaPackage\Form\FormDataProvider\TcaCTypeItem;
use AgrosupDijon\BulmaPackage\Hooks\PageRenderer\BulmaMetaTagHook;
use AgrosupDijon\BulmaPackage\Hooks\PageRenderer\BulmaPageTitleHook;
use AgrosupDijon\BulmaPackage\Hooks\PageRenderer\PreProcessHook;
use AgrosupDijon\BulmaPackage\Parser\ScssParser;
use TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/*
* This file is part of the package agrosup-dijon/bulma-package.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
defined('TYPO3') or die();
/***************
* Define TypoScript as content rendering template
*/
$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'bulmapackage/Configuration/TypoScript/';
$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'bulmapackage/Configuration/TypoScript/ContentElement/';
/***************
* Make the extension configuration accessible
*/
$extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class);
$bulmaPackageConfiguration = $extensionConfiguration->get('bulma_package');
// CType filter for content in accordions/tabs
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'][TcaCTypeItem::class] = [
'depends' => [
TcaSelectItems::class,
],
];
/***************
* Register "asd" as global fluid namespace
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['asd'][] = 'AgrosupDijon\\BulmaPackage\\ViewHelpers';
/***************
* Add default RTE configuration for Bulma package
*/
$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['bulma'] = 'EXT:bulma_package/Configuration/RTE/Default.yaml';
/***************
* Register css processing parser
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/bulma-package/css']['parser'][ScssParser::class] = ScssParser::class;
/***************
* Register css processing hooks
*/
if (!(bool)$bulmaPackageConfiguration['disableScssProcessing']) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][PreProcessHook::class] = PreProcessHook::class . '->execute';
}
/***************
* Register title processing hooks
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'][BulmaPageTitleHook::class] = BulmaPageTitleHook::class . '->execute';
/***************
* Register Meta tags hooks
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess'][BulmaMetaTagHook::class] = BulmaMetaTagHook::class . '->execute';
/***************
* Require autoload for dependencies when not using composer
*/
if (!Environment::isComposerMode()) {
require ExtensionManagementUtility::extPath('bulma_package') . '/Resources/Private/Contrib/Php/vendor/autoload.php';
}
/***************
* Register new backend stylesheet to override rte_ckeditor css
*/
$GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']['bulma_package'] = 'EXT:bulma_package/Resources/Public/Css/Skin/';