tx_lunabamusic_domain_model_song.php 7.86 KB
Newer Older
Dainis Abols's avatar
Dainis Abols committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

return [
    'ctrl'      => [
        'title'     => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.title',
        'label'     => 'title',
        'typeicon_classes' => [
            'default' => 'ext-lunabamusic-song'
        ],
        'tstamp' => 'tstamp',
        'crdate' => 'crdate',
        'cruser_id' => 'cruser_id',
        'default_sortby' => 'ORDER BY crdate',
        'delete' => 'deleted',
        'enablecolumns' => [
            'disabled' => 'hidden',
            'starttime' => 'starttime',
            'endtime' => 'endtime',
        ],
    ],
    'columns'   => [
        'hidden'     => [
            'exclude' => 1,
Dainis Abols's avatar
Dainis Abols committed
24
            'label'   => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
Dainis Abols's avatar
Dainis Abols committed
25
26
            'config'  => [
                'type'    => 'check',
Dainis Abols's avatar
Dainis Abols committed
27
                'default' => 0,
Dainis Abols's avatar
Dainis Abols committed
28
29
30
31
            ],
        ],
        'starttime'  => [
            'exclude' => 1,
Dainis Abols's avatar
Dainis Abols committed
32
            'label'   => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
Dainis Abols's avatar
Dainis Abols committed
33
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
34
35
36
37
38
39
40
                'type'       => 'input',
                'renderType' => 'inputDateTime',
                'size'       => 8,
                'max'        => 20,
                'eval'       => 'date,int',
                'default'    => 0,
                'checkbox'   => 0,
Dainis Abols's avatar
Dainis Abols committed
41
42
43
44
            ],
        ],
        'endtime'    => [
            'exclude' => 1,
Dainis Abols's avatar
Dainis Abols committed
45
            'label'   => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
Dainis Abols's avatar
Dainis Abols committed
46
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
47
48
49
50
51
52
53
54
                'type'       => 'input',
                'renderType' => 'inputDateTime',
                'size'       => 8,
                'max'        => 20,
                'eval'       => 'date,int',
                'checkbox'   => 0,
                'default'    => 0,
                'range'      => [
Dainis Abols's avatar
Dainis Abols committed
55
56
57
58
59
60
61
62
63
64
                    'upper' => mktime(3, 14, 7, 1, 19, 2038),
                    'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')),
                ],
            ],
        ],
        'top'        => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:top.title',
            'config'  => [
                'type'                => 'select',
Dainis Abols's avatar
Dainis Abols committed
65
                'renderType'          => 'selectSingle',
Dainis Abols's avatar
Dainis Abols committed
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
                'foreign_table'       => 'tx_lunabamusic_domain_model_top',
                'foreign_table_where' => 'AND tx_lunabamusic_domain_model_top.pid=###CURRENT_PID### ORDER BY tx_lunabamusic_domain_model_top.uid',
                'size'                => 1,
                'minitems'            => 0,
                'maxitems'            => 1,
                'wizards'             => [
                    '_PADDING'  => 2,
                    '_VERTICAL' => 1,
                    'edit'      => [
                        'type'                     => 'popup',
                        'title'                    => 'Edit',
                        'module'                   => [
                            'name' => 'wizard_edit',
                        ],
                        'popup_onlyOpenIfSelected' => 1,
                        'icon'                     => 'edit2.gif',
                        'JSopenParams'             => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
                    ],
                ],
            ],
        ],
        'title'      => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.title',
            'config'  => [
                'type' => 'input',
                'size' => 30,
                'eval' => 'required,trim',
            ],
        ],
        'artist'     => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.artist',
            'config'  => [
                'type' => 'input',
                'size' => 30,
                'eval' => 'trim',
            ],
        ],
        'music_file' => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.music_file',
Dainis Abols's avatar
Dainis Abols committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
            'config'  => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
                'music_file',
                [
                    'foreign_types' => [
                        \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
                            'showItem' => '--palette--;;audioOverlayPalette',
                        ],
                    ],
                    'maxitems'      => 1,
                    'max_size'      => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
                ],
                'mp3,ogg,opus,flac',
                'php,php3'
            ),
Dainis Abols's avatar
Dainis Abols committed
122
        ],
Dainis Abols's avatar
Dainis Abols committed
123
        'link' => [
Dainis Abols's avatar
Dainis Abols committed
124
125
126
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.link',
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
127
128
129
130
131
132
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => 15,
                'max'        => 255,
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
133
134
            ],
        ],
Dainis Abols's avatar
Dainis Abols committed
135
        'facebook' => [
Dainis Abols's avatar
Dainis Abols committed
136
137
138
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.facebook',
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
139
140
141
142
143
144
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => 15,
                'max'        => 255,
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
145
146
            ],
        ],
Dainis Abols's avatar
Dainis Abols committed
147
        'twitter' => [
Dainis Abols's avatar
Dainis Abols committed
148
149
150
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.twitter',
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
151
152
153
154
155
156
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => 15,
                'max'        => 255,
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
157
158
            ],
        ],
Dainis Abols's avatar
Dainis Abols committed
159
        'youtube' => [
Dainis Abols's avatar
Dainis Abols committed
160
161
162
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.youtube',
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
163
164
165
166
167
168
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => 15,
                'max'        => 255,
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
169
170
            ],
        ],
Dainis Abols's avatar
Dainis Abols committed
171
        'draugiem' => [
Dainis Abols's avatar
Dainis Abols committed
172
173
174
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.draugiem',
            'config'  => [
Dainis Abols's avatar
Dainis Abols committed
175
176
177
178
179
180
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => 15,
                'max'        => 255,
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
            ],
        ],
        'google'     => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.google',
            'config'  => [
                'type'     => 'input',
                'size'     => 15,
                'max'      => 255,
                'checkbox' => '',
                'eval'     => 'trim',
            ],
        ],
        'info'       => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_nabamusic/Resources/Private/Language/locallang.xlf:song.info',
            'config'  => [
                'type'    => 'text',
                'cols'    => 30,
                'rows'    => 5,
                'enableRichtext' => true,
            ],
        ],
    ],
    'types'     => [
Dainis Abols's avatar
Dainis Abols committed
206
        '0' => ['showitem' => 'hidden, --palette--;;1, top, title, artist, music_file, link, facebook, twitter, youtube, draugiem, google, info'],
Dainis Abols's avatar
Dainis Abols committed
207
208
209
210
211
    ],
    'palettes'  => [
        '1' => ['showitem' => 'starttime, endtime'],
    ],
];