forked from TYPO3-svn-archive/pbsurvey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
125 lines (120 loc) · 6.9 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
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
// get extension confArr
$arrConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['pbsurvey']);
// disable/enable adding of text (copy[*]) to text of copied records
$blnPrependAtCopy = $arrConfiguration['prependAtCopy']?'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy':' ';
$TCA['tx_pbsurvey_item'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:pbsurvey/lang/locallang_db.xml:tx_pbsurvey_item',
'label' => 'question',
'label_alt' => 'question_type',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'prependAtCopy' => $blnPrependAtCopy,
'useColumnsForDefaultValues' => 'type',
'transOrigPointerField' => 'l18n_parent',
'transOrigDiffSourceField' => 'l18n_diffsource',
'languageField' => 'sys_language_uid',
'type' => 'question_type',
'typeicon_column' => 'question_type',
'typeicons' => array (
'0' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_tx_pbsurvey_item.gif',
'1' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_1.gif',
'2' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_2.gif',
'3' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_3.gif',
'4' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_4.gif',
'5' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_5.gif',
'6' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_6.gif',
'7' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_7.gif',
'8' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_8.gif',
'9' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_9.gif',
'10' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_10.gif',
'11' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_11.gif',
'12' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_12.gif',
'13' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_13.gif',
'14' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_14.gif',
'15' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_15.gif',
'16' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_16.gif',
'17' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_17.gif',
'18' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_18.gif',
'19' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_19.gif',
'20' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_20.gif',
'21' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_21.gif',
'22' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_22.gif',
'23' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_23.gif',
'24' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_pbsurvey_item_24.gif',
),
'sortby' => 'sorting',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_tx_pbsurvey_item.gif',
),
// 'feInterface' => array (
// 'fe_admin_fieldList' => 'hidden,question_type,question,question_alias,question_subtext,page_title,page_introduction,options_required,options_random,options_alignment,options_minimum_responses,options_maximum_responses,answers,answers_allow_additionional,answers_type_additional',
// )
);
$TCA['tx_pbsurvey_results'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:pbsurvey/lang/locallang_db.xml:tx_pbsurvey_results',
'label' => 'uid',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_tx_pbsurvey_results.gif',
),
);
$TCA['tx_pbsurvey_answers'] = array (
'ctrl' => array (
'title' => 'LLL:EXT:pbsurvey/lang/locallang_db.xml:tx_pbsurvey_answers',
'label' => 'question',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'delete' => 'deleted',
'enablecolumns' => array (
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icons/icon_tx_pbsurvey_results.gif',
),
);
t3lib_div::loadTCA('tt_content');
// Exclude fields from displaying and add FlexForm content
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']='layout,select_key,pages,recursive';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='pi_flexform';
// Add tablename to default list of allowed tables on pages. Otherwise only in SysFolders
t3lib_extMgm::allowTableOnStandardPages('tx_pbsurvey_item');
t3lib_extMgm::allowTableOnStandardPages('tx_pbsurvey_results');
t3lib_extMgm::allowTableOnStandardPages('tx_pbsurvey_answers');
// Adds Questionaire to the list of plugins in content elements of type 'Insert plugin'
t3lib_extMgm::addPlugin(array('LLL:EXT:pbsurvey/lang/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY.'_pi1'),'list_type');
// Adds an entry to the 'ds' array of the tt_content field 'pi_flexform'.
t3lib_extMgm::addPiFlexFormValue('pbsurvey_pi1', 'FILE:EXT:pbsurvey/flexform_ds.xml');
// initialize static extension templates
t3lib_extMgm::addStaticFile($_EXTKEY,'static/css/','default CSS-styles');
// initialize 'context sensitive help' (csh)
t3lib_extMgm::addLLrefForTCAdescr('tx_pbsurvey_item','EXT:pbsurvey/csh/locallang_pbsurvey_item.xml');
t3lib_extMgm::addLLrefForTCAdescr('tx_pbsurvey_results','EXT:pbsurvey/csh/locallang_pbsurvey_results.xml');
t3lib_extMgm::addLLrefForTCAdescr('tx_pbsurvey_answers','EXT:pbsurvey/csh/locallang_pbsurvey_answers.xml');
t3lib_extMgm::addLLrefForTCAdescr('xEXT_pbsurvey','EXT:pbsurvey/csh/locallang_manual.xml');
t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_txpbsurveyM1','EXT:pbsurvey/csh/locallang_mod1.xml');
t3lib_extMgm::addLLrefForTCAdescr('_MOD_web_txpbsurveyM1','EXT:pbsurvey/csh/locallang_modfunc1.xml');
// sets the transformation mode for the RTE to "ts_css" if the extension css_styled_content is installed (default is: "ts")
if (t3lib_extMgm::isLoaded('css_styled_content')) {
t3lib_extMgm::addPageTSConfig('RTE.config.tx_pbsurvey_item.page_introduction.proc.overruleMode=ts_css');
t3lib_extMgm::addPageTSConfig('RTE.config.tx_pbsurvey_item.question_subtext.proc.overruleMode=ts_css');
}
if (TYPO3_MODE=='BE') {
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_pbsurvey_pi1_wizicon'] = t3lib_extMgm::extPath($_EXTKEY).'pi1/class.tx_pbsurvey_pi1_wizicon.php';
t3lib_extMgm::addModule('web','txpbsurveyM1','',t3lib_extMgm::extPath($_EXTKEY).'mod1/');
t3lib_extMgm::insertModuleFunction('web_txpbsurveyM1','tx_pbsurvey_modfunc1',t3lib_extMgm::extPath($_EXTKEY).'modfunc1/class.tx_pbsurvey_modfunc1.php','LLL:EXT:pbsurvey/lang/locallang_modfunc1.xml:moduleFunction');
}
?>