tx_lunotices_domain_model_notices.php 5.44 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
24
25
26
27
28
29
30
31
32
33
34
<?php
return [
    'ctrl'     => [
        'title'            => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:extension.title',
        'label'            => 'title',
        'sortby'           => 'sorting',
        'typeicon_classes' => [
            'default' => 'content-special-uploads',
        ],
        'tstamp'           => 'tstamp',
        'crdate'           => 'crdate',
        'cruser_id'        => 'cruser_id',
        'delete'           => 'deleted',
        'topic_id'         => 'topic_id',
        'enablecolumns'    => [
            'disabled' => 'hidden',
            'delete'   => 'deleted',
        ],
        'searchFields'     => 'title,body,summary',
    ],
    'columns'  => [
        'hidden'    => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:hidden',

            'config' => [
                'type'    => 'check',
                'default' => '0',
            ],
        ],
        'starttime' => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:starttime',
            'config'  => [
35
36
                'type'       => 'input',
                'renderType' => 'inputDateTime',
Dainis Abols's avatar
Dainis Abols committed
37
                'size'       => 16,
38
39
                'eval'       => 'datetime,int',
                'default'    => '0',
Dainis Abols's avatar
Dainis Abols committed
40
41
42
43
44
45
            ],
        ],
        'endtime'   => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:endtime',
            'config'  => [
46
47
                'type'       => 'input',
                'renderType' => 'inputDateTime',
Dainis Abols's avatar
Dainis Abols committed
48
                'size'       => 16,
49
50
51
                'eval'       => 'datetime,int',
                'default'    => '0',
                'range'      => [
Dainis Abols's avatar
Dainis Abols committed
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
                    'upper' => mktime(3, 14, 7, 1, 19, 2038),
                    'lower' => mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')),
                ],
            ],
        ],
        'topic_id'  => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notice.topic',
            'config'  => [
                'type'          => 'select',
                'renderType'    => 'selectSingle',
                'itemsProcFunc' => 'Lu\LuNotices\Controller\NoticesController->renderTopicFields',
                'foreign_table' => 'tx_lunotices_domain_model_topics',
                'maxitems'      => 1,
            ],
        ],
        'title'     => [
            'label'  => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notices.title',
            'config' => [
                'type' => 'input',
                'size' => '30',
                'eval' => 'required',
            ],
        ],
        'summary'   => [
            'label'  => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notices.summary',
            'config' => [
                'type' => 'text',
                'eval' => 'trim',
            ],
        ],
83
84
85
86
87
88
89
90
        'body' => [
            'label'  => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notices.body',
            'config' => [
                'type'           => 'text',
                'enableRichtext' => true,
                'cols'           => 30,
                'rows'           => 5,
                'eval'           => 'trim',
Dainis Abols's avatar
Dainis Abols committed
91
92
            ],
        ],
93
        'url' => [
Dainis Abols's avatar
Dainis Abols committed
94
95
96
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notice.url',
            'config'  => [
97
98
99
100
101
102
                'type'       => 'input',
                'renderType' => 'inputLink',
                'size'       => '15',
                'max'        => '255',
                'checkbox'   => '',
                'eval'       => 'trim',
Dainis Abols's avatar
Dainis Abols committed
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
            ],
        ],
        'priority'  => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notice.priority',
            'config'  => [
                'type'     => 'input',
                'size'     => '4',
                'max'      => '4',
                'eval'     => 'int',
                'checkbox' => '0',
                'range'    => [
                    'upper' => '999',
                    'lower' => '0',
                ],
                'default'  => 0,
            ],
        ],
        'files'     => [
            'exclude' => 0,
            'label'   => 'LLL:EXT:lu_notices/Resources/Private/Language/locallang.xlf:notice.files',
124
125
126
127
128
129
130
131
132
            'config'  => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
                'files',
                [
                    'minitems'      => 0,
                    'maxitems'      => 100,
                ],
                '',
                'php,php3'
            ),
Dainis Abols's avatar
Dainis Abols committed
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
        ],
    ],
    'types'    => [
        '0' => [
            'showitem' => '--palette--;;paletteTitle,
            --palette--;;paletteAccess,--palette--;;paletteDate,
            summary;;;;3-3-3,
                body;;;richtext[]:rte_transform[mode=ts],--palette--;;alternativeTitles',
        ],
    ],
    'palettes' => [
        'paletteTitle'      => ['showitem' => 'title;;;;2-2-2,topic_id'],
        'paletteAccess'     => [
            'showitem' => 'priority,hidden',
        ],
        'paletteDate'       => [
            'showitem' => 'starttime,endtime',
        ],
        'alternativeTitles' => [
            'showitem' => 'files,url',
        ],
    ],
];