tx_sgmail_domain_model_mail.php 6.38 KB
Newer Older
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 = [
28
29
	'ctrl' => [
		'title' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail',
30
		'label' => 'mail_subject',
31
32
33
34
		'label_alt_force' => TRUE,
		'tstamp' => 'tstamp',
		'crdate' => 'crdate',
		'cruser_id' => 'cruser_id',
35
		'searchFields' => 'blacklisted, mail_subject, mail_body, to_address, from_address, from_name, bcc_addresses, cc_addresses, extension_key, template_name, sending_time, last_sending_time, language',
36
37
38
39
40
		'dividers2tabs' => TRUE,
		'delete' => 'deleted',
		'enablecolumns' => [
			'disabled' => 'hidden',
		],
41
		'default_sortby' => 'ORDER BY priority DESC',
42
		'iconfile' => 'EXT:sg_mail/Resources/Public/Icons/ModuleIconTCA.svg'
43
	],
44
	'interface' => [],
45
46
	'types' => [
		'1' => [
47
			'showitem' => 'hidden;;1, blacklisted, priority, to_address, from_address, mail_subject, mail_body, from_name, bcc_addresses, cc_addresses, extension_key, template_name, sending_time, last_sending_time, language, attachments'
48
49
50
		],
	],
	'columns' => [
51
52
		'hidden' => [
			'exclude' => TRUE,
Paul Ilea's avatar
Paul Ilea committed
53
			'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden.I.0',
54
			'config' => [
55
56
				'type' => 'check',
			],
57
		],
58
		'blacklisted' => [
59
			'exclude' => TRUE,
60
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.blacklisted',
61
62
63
64
			'config' => [
				'type' => 'check',
			],
		],
65
66
67
		'mail_subject' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.mail_subject',
68
			'config' => [
69
70
71
				'type' => 'input',
				'eval' => 'required, trim'
			],
72
		],
73
		'mail_body' => [
74
			'exclude' => TRUE,
75
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.mail_body',
76
			'config' => [
77
78
79
80
				'type' => 'text',
				'cols' => 40,
				'rows' => 10,
				'eval' => 'trim',
81
82
83
			],
		],
		'to_address' => [
84
			'exclude' => TRUE,
85
86
87
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.to_address',
			'config' => [
				'type' => 'input',
88
89
				'eval' => 'required, email'
			],
90
91
		],
		'from_address' => [
92
			'exclude' => TRUE,
93
94
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.from_address',
			'config' => [
95
96
97
98
99
100
101
102
103
104
105
106
				'type' => 'input',
				'eval' => 'required, email'
			],
		],
		'priority' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.priority',
			'config' => [
				'type' => 'input',
				'eval' => 'int'
			],
		],
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
		'from_name' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.from_name',
			'config' => [
				'type' => 'input',
				'eval' => ''
			],
		],
		'cc_addresses' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.cc_addresses',
			'config' => [
				'type' => 'input',
				'eval' => ''
			],
		],
		'bcc_addresses' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.bcc_addresses',
			'config' => [
				'type' => 'input',
				'eval' => ''
			],
130
131
132
133
134
		],
		'extension_key' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.extension_key',
			'config' => [
135
				'type' => 'input'
136
137
138
139
140
141
			],
		],
		'template_name' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.template_name',
			'config' => [
142
				'type' => 'input'
143
			],
144
145
146
147
148
		],
		'sending_time' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.sending_time',
			'config' => [
149
150
151
152
153
154
155
				'type' => 'input',
				'size' => 13,
				'eval' => 'datetime',
				'checkbox' => 0,
				'default' => 0,
				'readOnly' => TRUE,
				'renderType' => 'inputDateTime'
156
157
			],
		],
158
159
160
161
		'last_sending_time' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.last_sending_time',
			'config' => [
162
163
164
165
166
167
168
				'type' => 'input',
				'size' => 13,
				'eval' => 'datetime',
				'checkbox' => 0,
				'default' => 0,
				'readOnly' => TRUE,
				'renderType' => 'inputDateTime'
169
170
			],
		],
171
172
173
174
		'reply_to' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.reply_to',
			'config' => [
175
				'type' => 'input'
176
			],
177
		],
178
179
180
181
182
183
184
		'language' => [
			'exclude' => TRUE,
			'label' => 'LLL:EXT:sg_mail/Resources/Private/Language/locallang_db.xlf:tx_sgmail_domain_model_mail.language',
			'config' => [
				'type' => 'input',
				'eval' => 'required, trim'
			],
185
186
187
188
189
190
191
192
193
194
195
		],
		'attachments' => [
			'exclude' => TRUE,
			'label' => 'Attachments',
			'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
				'attachments',
				[
					'appearance' => [
						'collapseAll' => TRUE
					],
					'maxitems' => 9999
196
197
				]
			)
198
		]
199
200
	]
];
201
202
203
204
205
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '10.3.0', '<')) {
	$columns['interface']['showRecordFieldList'] = 'hidden, blacklisted, mail_subject, mail_body, to_address, from_address, priority, from_name, bcc_addresses, cc_addresses, extension_key, template_name, sending_time, last_sending_time, language';
}

return $columns;