forked from teaminmedias-pluswerk/ke_search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_tables.php
161 lines (142 loc) · 6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$extPath = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ke_search');
$extRelPath = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('ke_search');
if (TYPO3_MODE == 'BE') {
require_once($extPath . 'Classes/lib/class.tx_kesearch_lib_items.php');
}
$tempColumns = array(
'tx_kesearch_tags' => array(
'exclude' => 0,
'label' => 'LLL:EXT:ke_search/locallang_db.xml:pages.tx_kesearch_tags',
'config' => array(
'type' => 'select',
'size' => 10,
'minitems' => 0,
'maxitems' => 100,
'items' => array(),
'allowNonIdValues' => true,
'itemsProcFunc' => 'user_filterlist->getListOfAvailableFiltersForTCA',
)
),
);
// help file
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_kesearch_filters', 'EXT:ke_search/locallang_csh.xml');
// Show FlexForm field in plugin configuration
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi2'] = 'pi_flexform';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi3'] = 'pi_flexform';
// Configure FlexForm field
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi1', 'FILE:EXT:ke_search/pi1/flexform_pi1.xml');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi2', 'FILE:EXT:ke_search/pi2/flexform_pi2.xml');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($_EXTKEY . '_pi3', 'FILE:EXT:ke_search/pi3/flexform_pi3.xml');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tempColumns);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'tx_kesearch_tags;;;;1-1-1');
if (TYPO3_MODE == 'BE') {
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath('web_txkesearchM1', $extPath . 'mod1/');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('web', 'txkesearchM1', '', $extPath . 'mod1/');
}
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key';
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi2'] = 'layout,select_key';
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi3'] = 'layout,select_key';
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array(
'LLL:EXT:ke_search/locallang_db.xml:tt_content.list_type_pi1',
$_EXTKEY . '_pi1',
$extRelPath . 'ext_icon.gif'), 'list_type'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array(
'LLL:EXT:ke_search/locallang_db.xml:tt_content.list_type_pi2',
$_EXTKEY . '_pi2',
$extRelPath . 'ext_icon.gif'), 'list_type'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array(
'LLL:EXT:ke_search/locallang_db.xml:tt_content.list_type_pi3',
$_EXTKEY . '_pi3',
$extRelPath . 'ext_icon.gif'), 'list_type'
);
$GLOBALS['TCA']['tx_kesearch_filters'] = array(
'ctrl' => array(
'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filters',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'default_sortby' => 'ORDER BY crdate',
'delete' => 'deleted',
'type' => 'rendertype',
'enablecolumns' => array(
'disabled' => 'hidden',
),
'dynamicConfigFile' => $extPath . 'tca.php',
'iconfile' => $extRelPath . 'res/img/table_icons/icon_tx_kesearch_filters.gif',
'searchFields' => 'title'
),
);
$GLOBALS['TCA']['tx_kesearch_filteroptions'] = array(
'ctrl' => array(
'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_filteroptions',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array(
'disabled' => 'hidden',
),
'dynamicConfigFile' => $extPath . 'tca.php',
'iconfile' => $extRelPath . 'res/img/table_icons/icon_tx_kesearch_filteroptions.gif',
'searchFields' => 'title,tag'
),
);
$GLOBALS['TCA']['tx_kesearch_index'] = array(
'ctrl' => array(
'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_index',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY crdate',
'enablecolumns' => array(
'starttime' => 'starttime',
'endtime' => 'endtime',
'fe_group' => 'fe_group',
),
'dynamicConfigFile' => $extPath . 'tca.php',
'iconfile' => $extRelPath . 'res/img/table_icons/icon_tx_kesearch_index.gif',
),
);
// class for displaying the category tree for tt_news in BE forms.
if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) {
include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('tt_news') . 'lib/class.tx_ttnews_TCAform_selectTree.php');
}
$GLOBALS['TCA']['tx_kesearch_indexerconfig'] = array(
'ctrl' => array(
'title' => 'LLL:EXT:ke_search/locallang_db.xml:tx_kesearch_indexerconfig',
'label' => 'title',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'default_sortby' => 'ORDER BY crdate',
'delete' => 'deleted',
'enablecolumns' => array(
'disabled' => 'hidden',
),
'dynamicConfigFile' => $extPath . 'tca.php',
'iconfile' => $extRelPath . 'res/img/table_icons/icon_tx_kesearch_indexerconfig.gif',
'searchFields' => 'title'
),
);
if (TYPO3_MODE == 'BE') {
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_kesearch_pi1_wizicon'] = $extPath . 'pi1/class.tx_kesearch_pi1_wizicon.php';
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_kesearch_pi2_wizicon'] = $extPath . 'pi2/class.tx_kesearch_pi2_wizicon.php';
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_kesearch_pi3_wizicon'] = $extPath . 'pi3/class.tx_kesearch_pi3_wizicon.php';
}