b8f2bf67e3d01e77f8ca4df046ff603300330c5b
[Packages/TYPO3.CMS.git] / t3lib / stddb / tca_sys_file_reference.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 $TCA['sys_file_reference'] = array(
6 'ctrl' => $TCA['sys_file_reference']['ctrl'],
7 'interface' => array(
8 'showRecordFieldList' => 'hidden,uid_local,uid_foreign,tablenames,fieldname,sorting_foreign,table_local,title,description'
9 ),
10 'feInterface' => $TCA['sys_file_reference']['feInterface'],
11 'columns' => array(
12 'hidden' => array(
13 'exclude' => 1,
14 'label' => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
15 'config' => array(
16 'type' => 'check',
17 'default' => '0'
18 )
19 ),
20 'uid_local' => array(
21 'exclude' => 0,
22 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_local',
23 'config' => array(
24 'type' => 'group',
25 'internal_type' => 'db',
26 'size' => 1,
27 'maxitems' => 1,
28 'minitems' => 0,
29 'allowed' => 'sys_file'
30 )
31 ),
32 'uid_foreign' => array(
33 'exclude' => 0,
34 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.uid_foreign',
35 'config' => array(
36 'type' => 'select',
37 'items' => array(
38 array('', 0)
39 ),
40 'foreign_table' => 'tt_content',
41 'foreign_table_where' => 'ORDER BY tt_content.uid',
42 'size' => 1,
43 'minitems' => 0,
44 'maxitems' => 1
45 )
46 ),
47 'tablenames' => array(
48 'exclude' => 0,
49 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.tablenames',
50 'config' => array(
51 'type' => 'input',
52 'size' => '30',
53 'eval' => 'trim'
54 )
55 ),
56 'fieldname' => array(
57 'exclude' => 0,
58 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.fieldname',
59 'config' => array(
60 'type' => 'input',
61 'size' => '30'
62 )
63 ),
64 'sorting_foreign' => array(
65 'exclude' => 0,
66 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.sorting_foreign',
67 'config' => array(
68 'type' => 'input',
69 'size' => '4',
70 'max' => '4',
71 'eval' => 'int',
72 'checkbox' => '0',
73 'range' => array(
74 'upper' => '1000',
75 'lower' => '10'
76 ),
77 'default' => 0
78 )
79 ),
80 'table_local' => array(
81 'exclude' => 0,
82 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.table_local',
83 'config' => array(
84 'type' => 'input',
85 'size' => '20',
86 'default' => 'sys_file'
87 )
88 ),
89 'title' => array(
90 'exclude' => 0,
91 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.title',
92 'config' => array(
93 'type' => 'input',
94 'size' => '22',
95 'placeholder' => '__row|uid_local|title'
96 )
97 ),
98 'link' => array(
99 'exclude' => 1,
100 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
101 'config' => array(
102 'type' => 'input',
103 'size' => '20',
104 'wizards' => array(
105 '_PADDING' => 2,
106 'link' => array(
107 'type' => 'popup',
108 'title' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.link',
109 'icon' => 'link_popup.gif',
110 'script' => 'browse_links.php?mode=wizard',
111 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1'
112 )
113 )
114 )
115 ),
116 'description' => array(
117 // This is used for captions in the frontend
118 'exclude' => 0,
119 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.description',
120 'config' => array(
121 'type' => 'text',
122 'cols' => '24',
123 'rows' => '5'
124 )
125 ),
126 'alternative' => array(
127 'exclude' => 0,
128 'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.alternative',
129 'config' => array(
130 'type' => 'input',
131 'size' => '22',
132 'placeholder' => '__row|uid_local|name'
133 )
134 )
135 ),
136 'types' => array(
137 // Note that at the moment we define the same fields for every media type.
138 // We leave the extensive definition of each type here anyway, to make clear that you can use it to differentiate between the types.
139 '0' => array(
140 'showitem' => '
141 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
142 --palette--;;filePalette'
143 ),
144 \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
145 'showitem' => '
146 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
147 --palette--;;filePalette'
148 ),
149 \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
150 'showitem' => '
151 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
152 --palette--;;filePalette'
153 ),
154 \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
155 'showitem' => '
156 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
157 --palette--;;filePalette'
158 ),
159 \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
160 'showitem' => '
161 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
162 --palette--;;filePalette'
163 ),
164 \TYPO3\CMS\Core\Resource\File::FILETYPE_SOFTWARE => array(
165 'showitem' => '
166 --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
167 --palette--;;filePalette'
168 )
169 ),
170 'palettes' => array(
171 // used for basic overlays: having a file list etc
172 'basicoverlayPalette' => array(
173 'showitem' => 'title,description',
174 'canNotCollapse' => TRUE
175 ),
176 // used for everything that is an image (because it has a link and a alternative text)
177 'imageoverlayPalette' => array(
178 'showitem' => '
179 title,alternative;;;;3-3-3,--linebreak--,
180 link,description
181 ',
182 'canNotCollapse' => TRUE
183 ),
184 // file palette, hidden but needs to be included all the time
185 'filePalette' => array(
186 'showitem' => 'uid_local,hidden',
187 'isHiddenPalette' => TRUE
188 )
189 )
190 );
191 ?>