4cac8ac9a48f365ce4cd800d2b7050a6041c895a
[TYPO3CMS/Extensions/static_info_tables.git] / Configuration / TCA / static_territories.php
1 <?php
2 // UN Territory reference data
3 return array(
4 'ctrl' => array(
5 'label' => 'tr_name_en',
6 'label_alt' => 'tr_iso_nr',
7 'label_alt_force' => 1,
8 'label_userFunc' => 'SJBR\\StaticInfoTables\\Hook\\Backend\\Form\\ElementRenderingHelper->addIsoCodeToLabel',
9 'adminOnly' => 1,
10 'rootLevel' => 1,
11 'is_static' => 1,
12 'readOnly' => 1,
13 'default_sortby' => 'ORDER BY tr_name_en',
14 'delete' => 'deleted',
15 'title' => 'LLL:EXT:static_info_tables/Resources/Private/Language/locallang_db.xlf:static_territories.title',
16 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('static_info_tables') . 'Resources/Public/Images/Icons/icon_static_territories.gif',
17 'searchFields' => 'tr_name_en'
18 ),
19 'interface' => array(
20 'showRecordFieldList' => 'tr_iso_nr,tr_parent_iso_nr,tr_name_en'
21 ),
22 'columns' => array(
23 'deleted' => array(
24 'readonly' => 1,
25 'label' => 'LLL:EXT:static_info_tables/Resources/Private/Language/locallang_db.xlf:deleted',
26 'config' => array(
27 'type' => 'check'
28 )
29 ),
30 'tr_iso_nr' => array(
31 'label' => 'LLL:EXT:static_info_tables/Resources/Private/Language/locallang_db.xlf:static_territories_item.tr_iso_nr',
32 'exclude' => '0',
33 'config' => array(
34 'type' => 'input',
35 'size' => '7',
36 'max' => '7',
37 'eval' => 'int',
38 'default' => '0'
39 )
40 ),
41 'tr_parent_territory_uid' => array(
42 'exclude' => 0,
43 'label' => 'LLL:EXT:static_info_tables/Resources/Private/Language/locallang_db.xlf:static_territories_item.tr_parent_territory_uid',
44 'config' => array(
45 'type' => 'select',
46 'items' => array(
47 array('', 0),
48 ),
49 'foreign_table' => 'static_territories',
50 'foreign_table_where' => 'ORDER BY static_territories.tr_name_en',
51 'itemsProcFunc' => 'SJBR\StaticInfoTables\Hook\Backend\Form\ElementRenderingHelper->translateTerritoriesSelector',
52 'size' => 1,
53 'minitems' => 0,
54 'maxitems' => 1,
55 )
56 ),
57 'tr_parent_iso_nr' => array(
58 'config' => array(
59 'type' => 'passthrough',
60 )
61 ),
62 'tr_name_en' => array(
63 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.name',
64 'exclude' => '0',
65 'config' => array(
66 'type' => 'input',
67 'size' => '18',
68 'max' => '45',
69 'eval' => 'trim',
70 'default' => '',
71 '_is_string' => '1'
72 )
73 ),
74 ),
75 'types' => array(
76 '1' => array(
77 'showitem' => 'tr_iso_nr,tr_name_en,fk_billing_country,--palette--;;1;;'
78 )
79 ),
80 'palettes' => array(
81 '1' => array(
82 'showitem' => 'tr_parent_territory_uid,tr_parent_iso_nr', 'canNotCollapse' => '1'
83 )
84 )
85 );