[FEATURE] TCA-record-collection based on collection interfaces
[Packages/TYPO3.CMS.git] / t3lib / stddb / tbl_be.php
index 3fbc82b..426b554 100644 (file)
@@ -700,6 +700,173 @@ $TCA['sys_filemounts'] = array(
        )
 );
 
+/**
+ * tca-record collections
+ */
+$TCA['sys_collection'] = array(
+       'ctrl' => $TCA['sys_collection']['ctrl'],
+       'interface' => array (
+               'showRecordFieldList' => 'title, description, table_name, items'
+       ),
+       'feInterface' => $TCA['sys_collection']['feInterface'],
+       'columns' => array(
+               't3ver_label' => array(
+                       'label'  => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '30',
+                               'max'  => '30',
+                       )
+               ),
+               'sys_language_uid' => array(
+                       'exclude' => 1,
+                       'label'  => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
+                       'config' => array(
+                               'type'                => 'select',
+                               'foreign_table'       => 'sys_language',
+                               'foreign_table_where' => 'ORDER BY sys_language.title',
+                               'items' => array(
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
+                               )
+                       )
+               ),
+               'l10n_parent' => array (
+                       'displayCond' => 'FIELD:sys_language_uid:>:0',
+                       'exclude'     => 1,
+                       'label'       => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
+                       'config'      => array(
+                               'type'  => 'select',
+                               'items' => array(
+                                       array('', 0),
+                               ),
+                               'foreign_table'       => 'sys_file_collection',
+                               'foreign_table_where' => 'AND sys_file_collection.pid=###CURRENT_PID### AND sys_file_collection.sys_language_uid IN (-1,0)',
+                       )
+               ),
+               'l10n_diffsource' => array(
+                       'config' => array (
+                               'type' => 'passthrough'
+                       )
+               ),
+               'hidden' => array(
+                       'exclude' => 1,
+                       'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.hidden',
+                       'config'  => array (
+                               'type'    => 'check',
+                               'default' => '0'
+                       )
+               ),
+               'starttime' => array(
+                       'exclude' => 1,
+                       'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.starttime',
+                       'config'  => array (
+                               'type'     => 'input',
+                               'size'     => '8',
+                               'max'      => '20',
+                               'eval'     => 'date',
+                               'default'  => '0',
+                               'checkbox' => '0'
+                       )
+               ),
+               'endtime' => array(
+                       'exclude' => 1,
+                       'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.endtime',
+                       'config'  => array (
+                               'type'     => 'input',
+                               'size'     => '8',
+                               'max'      => '20',
+                               'eval'     => 'date',
+                               'checkbox' => '0',
+                               'default'  => '0',
+                               'range'    => array(
+                                       'upper' => mktime(3, 14, 7, 1, 19, 2038),
+                                       'lower' => mktime(0, 0, 0, date('m')-1, date('d'), date('Y'))
+                               )
+                       )
+               ),
+               'fe_group' => array(
+                       'exclude' => 1,
+                       'label'   => 'LLL:EXT:lang/locallang_general.xml:LGL.fe_group',
+                       'config'  => array(
+                               'type'  => 'select',
+                               'items' => array(
+                                       array('', 0),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.hide_at_login', -1),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.any_login', -2),
+                                       array('LLL:EXT:lang/locallang_general.xml:LGL.usergroups', '--div--')
+                               ),
+                               'foreign_table' => 'fe_groups'
+                       )
+               ),
+               'table_name' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.table_name',
+                       'config' => array (
+                               'type' => 'select',
+                               'special' => 'tables'
+                       )
+               ),
+               'items' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.items',
+                       'config' => array(
+                               'type' => 'group',
+                               'internal_type' => 'db',
+                               'prepend_tname' => TRUE,
+                               'allowed' => '*',
+                               'MM' => 'sys_collection_entries',
+                               'MM_hasUidField' => TRUE,
+                               'multiple' => TRUE,
+
+                       )
+               ),
+               'title' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.title',
+                       'config' => array(
+                               'type' => 'input',
+                               'size' => '60',
+                               'eval' => 'required'
+                       )
+               ),
+               'description' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.description',
+                       'config' => array(
+                               'type' => 'text',
+                               'cols' => '60',
+                               'rows' => '5'
+                       )
+               ),
+               'type' => array(
+                       'exclude' => 0,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_collection.type',
+                       'config' => array(
+                               'type' => 'select',
+                               'items' => array(
+                                       array('LLL:EXT:lang/locallang_tca.xlf:sys_collection.type.static', 'static'),
+                                       array('LLL:EXT:lang/locallang_tca.xlf:sys_collection.type.filter', 'filter')
+                               ),
+                               'default' => 'static'
+                       )
+               ),
+               'criteria' => array(
+                       'exclude' => 0,
+                       'label' => '[filter]',
+                       'config' => array(
+                               'type' => 'passthrough'
+                       )
+               )
+       ),
+       'types' => array (
+               'static' => array('showitem' => 'title;;1,type, description,table_name, items'),
+               'filter' => array('showitem' => 'title;;1,type, description,table_name')
+       ),
+       'palettes' => array (
+               '1' => array('showitem' => 'starttime, endtime, fe_group, sys_language_uid, l10n_parent, l10n_diffsource, hidden')
+       )
+);
 
 /**
  * System languages - Defines possible languages used for translation of records in the system