-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ext_localconf.php
executable file
·100 lines (83 loc) · 3.45 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
defined('TYPO3_MODE') or die();
$_LLL_be = 'LLL:EXT:contacts/Resources/Private/Language/locallang_be.xlf';
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'Contacts',
[
\Extcode\Contacts\Controller\ContactController::class => 'list, show, teaser',
],
[
\Extcode\Contacts\Controller\ContactController::class => 'list',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'ContactTeaser',
[
\Extcode\Contacts\Controller\ContactController::class => 'teaser',
],
[
\Extcode\Contacts\Controller\ContactController::class => '',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'Companies',
[
\Extcode\Contacts\Controller\CompanyController::class => 'list, show, teaser',
],
[
\Extcode\Contacts\Controller\CompanyController::class => 'list',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'CompanyTeaser',
[
\Extcode\Contacts\Controller\CompanyController::class => 'teaser',
],
[
\Extcode\Contacts\Controller\CompanyController::class => '',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'AddressSearch',
[
\Extcode\Contacts\Controller\AddressController::class => 'search',
],
[
\Extcode\Contacts\Controller\AddressController::class => 'search',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Contacts',
'Address',
[
\Extcode\Contacts\Controller\AddressController::class => 'show',
],
[
\Extcode\Contacts\Controller\AddressController::class => '',
]
);
// register "contacts:" namespace
$GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['contacts'][]
= 'Extcode\\Contacts\\ViewHelpers';
// update wizard for slugs
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['contactsSlugUpdater'] =
\Extcode\Contacts\Updates\SlugUpdater::class;
// clearCachePostProc Hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['contacts_clearcache'] =
\Extcode\Contacts\Hooks\DataHandler::class . '->clearCachePostProc';
// provide extension configuration for TypoScript
$extensionConfiguration = new \TYPO3\CMS\Core\Configuration\ExtensionConfiguration();
$contactsConfiguration = $extensionConfiguration->get('contacts');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.tx_contacts.googleMapsApiKey=' . $contactsConfiguration['googleMapsApiKey']);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants('plugin.tx_contacts.googleMapsLibrary=' . $contactsConfiguration['googleMapsLibrary']);
// register class to be available in 'eval' of TCA
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\Extcode\Contacts\DataHandler\EvalFloat8::class] = '';
// register layouts
$GLOBALS['TYPO3_CONF_VARS']['EXT']['contacts']['templateLayouts']['address'][] = [$_LLL_be . ':flexforms_template.templateLayout.address.gmaps', 'gmaps'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['contacts']['templateLayouts']['contact_teaser'][] = [$_LLL_be . ':flexforms_template.templateLayout.contact_teaser.default', 'default'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['contacts']['templateLayouts']['company_teaser'][] = [$_LLL_be . ':flexforms_template.templateLayout.company_teaser.default', 'default'];