-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
71 lines (65 loc) · 2.41 KB
/
ext_localconf.php
File metadata and controls
71 lines (65 loc) · 2.41 KB
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
<?php
defined('TYPO3') or die();
use OklabFlensburg\UranusEvents\Controller\EventController;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
// Register cache
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['uranus_events'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['uranus_events'] = [
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
'backend' => \TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend::class,
'options' => [
'defaultLifetime' => 3600,
],
'groups' => ['pages', 'all'],
];
}
// Register Extbase plugin actions
ExtensionUtility::configurePlugin(
'UranusEvents',
'Events',
[
EventController::class => 'list,detail,loadMore',
],
[
EventController::class => 'detail,loadMore',
]
);
// Register view configuration via TypoScript to ensure paths are always available
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
'plugin.tx_uranusevents.view {' . LF .
' templateRootPaths {' . LF .
' 10 = EXT:uranus_events/Resources/Private/Templates/' . LF .
' }' . LF .
' partialRootPaths {' . LF .
' 10 = EXT:uranus_events/Resources/Private/Templates/Partial/' . LF .
' }' . LF .
' layoutRootPaths {' . LF .
' 10 = EXT:uranus_events/Resources/Private/Templates/Layouts/' . LF .
' 20 = EXT:uranus_events/Resources/Private/Layouts/' . LF .
' }' . LF .
'}' . LF
);
// Icons are registered via Configuration/Icons.php (TYPO3 14.1+)
// Extension defaults
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['uranus_events'] = [
'apiBaseUrl' => 'https://uranus2.oklabflensburg.de',
'apiEndpoint' => '/api/events',
'cacheLifetime' => 3600,
'httpTimeout' => 30,
'maxRetries' => 3,
'debugMode' => false,
'defaultPrimaryColor' => '#0066cc',
'defaultSecondaryColor' => '#333333',
'defaultAccentColor' => '#ff6600',
'defaultFontFamily' => "'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",
'defaultBorderRadius' => 8,
'defaultDateFormat' => 'd.m.Y',
'defaultTimeFormat' => 'H:i',
'defaultEventsPerPage' => 20,
'defaultShowImages' => true,
'defaultShowVenueMap' => true,
'defaultShowOrganization' => true,
'defaultShowTags' => true,
'defaultShowExcerpt' => true,
'defaultShowReadMoreLink' => true,
];