Project

General

Profile

Bug #52116 » Collection.php

TCA - Benjamin Giesbrecht, 2013-09-18 18:10

 
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}

$TCA['tx_shgallery_domain_model_collection'] = array(
'ctrl' => $TCA['tx_shgallery_domain_model_collection']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, images',
),
'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, images,--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,starttime, endtime'),
),
'palettes' => array(
'1' => array('showitem' => ''),
),
'columns' => array(
'sys_language_uid' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf: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.xlf:LGL.allLanguages', -1),
array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
),
),
),
'l10n_parent' => array(
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
'config' => array(
'type' => 'select',
'items' => array(
array('', 0),
),
'foreign_table' => 'tx_shgallery_domain_model_collection',
'foreign_table_where' => 'AND tx_shgallery_domain_model_collection.pid=###CURRENT_PID### AND tx_shgallery_domain_model_collection.sys_language_uid IN (-1,0)',
),
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough',
),
),

't3ver_label' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => array(
'type' => 'input',
'size' => 30,
'max' => 255,
)
),
'hidden' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => array(
'type' => 'check',
),
),
'starttime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'endtime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'title' => array(
'exclude' => 0,
'label' => 'LLL:EXT:sh_gallery/Resources/Private/Language/locallang_db.xlf:tx_shgallery_domain_model_collection.title',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'images' => array(
'exclude' => 0,
'label' => 'LLL:EXT:sh_gallery/Resources/Private/Language/locallang_db.xlf:tx_shgallery_domain_model_collection.images',
'config' => array(
'maxitems' => 999,
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
'foreign_match_fields' => array(
'fieldname' => 'images'
),
'foreign_label' => 'uid_local',
'foreign_selector' => 'uid_local',
'foreign_selector_fieldTcaOverride' => array(
'config' => array(
'appearance' => array(
'elementBrowserType' => 'file',
'elementBrowserAllowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
)
),
'appearance' => array(
'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference',
'useSortable' => TRUE,
'collapseAll' => 1,
'expandSingle' => 1,
'headerThumbnail' => array(
'field' => 'uid_local',
'width' => '64',
'height' => '64',
),
'showPossibleLocalizationRecords' => TRUE,
'showRemovedLocalizationRecords' => TRUE,
'showSynchronizationLink' => TRUE,
'enabledControls' => array(
'info' => FALSE,
'new' => FALSE,
'dragdrop' => TRUE,
'sort' => FALSE,
'hide' => TRUE,
'delete' => TRUE,
'localize' => TRUE,
),
),
'behaviour' => array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
),
),
),
);

?>
(3-3/6)