tx_sgmail_domain_model_layout.php 4.66 KB
Newer Older
Paul Ilea's avatar
Paul Ilea committed
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
<?php

/***************************************************************
 *  Copyright notice
 *
 *  (c] sgalinski Internet Services (https://www.sgalinski.de]
 *
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
 *  free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option] any later version.
 *
 *  The GNU General Public License can be found at
 *  http://www.gnu.org/copyleft/gpl.html.
 *
 *  This script is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  This copyright notice MUST APPEAR in all copies of the script!
 ***************************************************************/

27
$columns = [
Paul Ilea's avatar
Paul Ilea committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
	'ctrl' => [
		'title' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout',
		'label' => 'name',
		'tstamp' => 'tstamp',
		'crdate' => 'crdate',
		'cruser_id' => 'cruser_id',
		'searchFields' => 'name, content',
		'dividers2tabs' => TRUE,
		'delete' => 'deleted',
		'languageField' => 'sys_language_uid',
		'transOrigPointerField' => 'l10n_parent',
		'transOrigDiffSourceField' => 'l10n_diffsource',
		'enablecolumns' => [
			'disabled' => 'hidden',
		],
		'default_sortby' => 'name',
		'hideTable' => TRUE,
		'iconfile' => 'EXT:sg_mail/Resources/Public/Icons/ModuleIconTCA.svg'
	],
47
	'interface' => [],
Paul Ilea's avatar
Paul Ilea committed
48
49
	'types' => [
		'1' => [
50
			'showitem' => 'hidden, --palette--;;name, head_content, content, '
Paul Ilea's avatar
Paul Ilea committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
		],
	],
	'palettes' => [
		'name' => [
			'showitem' => 'name, default'
		],
	],
	'columns' => [
		'hidden' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden.I.0',
			'config' => [
				'type' => 'check',
			],
		],
		'sys_language_uid' => [
67
			'exclude' => TRUE,
68
			'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
Paul Ilea's avatar
Paul Ilea committed
69
70
71
			'config' => [
				'type' => 'select',
				'renderType' => 'selectSingle',
72
				'special' => 'languages',
Paul Ilea's avatar
Paul Ilea committed
73
74
75
				'foreign_table' => 'sys_language',
				'foreign_table_where' => 'ORDER BY sys_language.title',
				'items' => [
76
77
78
79
80
					[
						'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
						-1,
						'flags-multiple'
					]
Paul Ilea's avatar
Paul Ilea committed
81
82
83
84
				],
				'default' => 0,
				'fieldWizard' => [
					'selectIcons' => [
85
						'disabled' => FALSE,
Paul Ilea's avatar
Paul Ilea committed
86
87
88
89
90
91
					],
				],
			]
		],
		'l10n_parent' => [
			'displayCond' => 'FIELD:sys_language_uid:>:0',
92
			'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
Paul Ilea's avatar
Paul Ilea committed
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
			'config' => [
				'type' => 'select',
				'renderType' => 'selectSingle',
				'items' => [
					['', 0]
				],
				'foreign_table' => 'tx_sgmail_domain_model_layout',
				'foreign_table_where' => 'AND tx_sgmail_domain_model_layout.uid=###REC_FIELD_l10n_parent### AND tx_sgmail_domain_model_layout.sys_language_uid IN (-1,0)',
				'default' => 0
			]
		],
		'l10n_diffsource' => [
			'config' => [
				'type' => 'passthrough',
				'default' => ''
			]
		],
		'default' => [
			'exclude' => TRUE,
			'l10n_mode' => 'exclude',
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.default',
			'config' => [
				'type' => 'check',
			],
		],
		'name' => [
			'exclude' => TRUE,
			'l10n_display' => 'defaultAsReadonly',
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.name',
			'config' => [
				'type' => 'input',
				'eval' => 'required, trim'
			],
		],
		'content' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.content',
130
			'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.content.info',
Paul Ilea's avatar
Paul Ilea committed
131
132
			'config' => [
				'type' => 'text',
133
				'renderType' => 't3editor'
Paul Ilea's avatar
Paul Ilea committed
134
135
			],
		],
136
137
138
139
140
141
142
143
144
		'head_content' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.head_content',
			'description' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_layout.head_content.info',
			'config' => [
				'type' => 'text',
				'renderType' => 't3editor'
			],
		],
Paul Ilea's avatar
Paul Ilea committed
145
146
	]
];
147
148
149
150
151
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '10.3.0', '<')) {
	$columns['interface']['showRecordFieldList'] = 'sys_language_uid, l10n_parent, l10n_diffsource, name, head_content, content, default';
}

return $columns;