-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathext_tables.php
82 lines (77 loc) · 2.98 KB
/
ext_tables.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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
/**
* Configuration template access
*/
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])) {
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
}
/**
* Powermail Extension
*/
if ($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]['enablePowermail']) {
// Include Static TypoScript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Powermail Crm Field');
// TCA fields modification
$tempColumns = [
'tx_bfcrmform_fieldname' => [
'exclude' => 0,
'label' => 'LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crmfield_name',
'config' => [
'size' => 25,
'type' => 'input',
'eval' => 'trim'
]
]
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_powermail_domain_model_fields', $tempColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tx_powermail_domain_model_fields',
'--div--;LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crmfield, tx_bfcrmform_fieldname',
'input,textarea,select,radio,check,password,hidden,date,country,location',
'after:own_marker_select'
);
// TCA forms modification
$tempColumns = [
'tx_bfcrmform_active' => [
'exclude' => 0,
'label' => 'LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crmpush_active',
'config' => [
'type' => 'check'
]
],
'tx_bfcrmform_url' => [
'exclude' => 0,
'label' => 'LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crmpush_url',
'config' => [
'size' => 25,
'type' => 'input',
'eval' => 'trim'
]
],
'tx_bfcrmform_accesskey' => [
'exclude' => 0,
'label' => 'LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crmpush_accesskey',
'config' => [
'size' => 25,
'type' => 'input',
'eval' => 'trim'
]
]
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tx_powermail_domain_model_forms', $tempColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tx_powermail_domain_model_forms',
'--div--;LLL:EXT:bf_crm_form/Resources/Private/Language/FormWizard.xlf:crm, tx_bfcrmform_active,tx_bfcrmform_url,tx_bfcrmform_accesskey',
'',
'after:css'
);
}
/**
* Configuration template reset
*/
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])) {
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY] = serialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
}