forked from FluidTYPO3/flux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
executable file
·74 lines (68 loc) · 2.47 KB
/
ext_tables.php
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['flux']['setup'] = unserialize($_EXTCONF);
$TCA['tt_content']['columns']['colPos']['config']['items'][] = array(
'LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_container',
\FluidTYPO3\Flux\Service\ContentService::COLPOS_FLUXCONTENT
);
$GLOBALS['TCA']['tt_content']['ctrl']['useColumnsForDefaultValues'] .= ',tx_flux_column,tx_flux_parent';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', array(
'tx_flux_column' => array (
'exclude' => 0,
'label' => 'LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_column',
'displayCond' => 'FIELD:tx_flux_parent:>:0',
'config' => array (
'type' => 'select',
'renderType' => 'selectSingle',
'items' => array(
array('', '')
),
'default' => '',
'itemsProcFunc' => 'FluidTYPO3\Flux\Backend\AreaListItemsProcessor->itemsProcFunc'
)
),
'tx_flux_parent' => array (
'exclude' => 0,
'label' => 'LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_parent',
'displayCond' => 'FIELD:tx_flux_parent:>:0',
'config' => array (
'type' => 'input',
'readOnly' => TRUE,
'foreign_table' => 'tt_content',
'foreign_table_where' => "AND tt_content.pid = '###CURRENT_PID###'",
'default' => 0,
'size' => 1,
'maxitems' => 1,
)
),
'tx_flux_children' => array (
'exclude' => 0,
'config' => array (
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_field' => 'tx_flux_parent',
'foreign_sortby' => 'sorting',
'appearance' => array(
'collapseAll' => TRUE,
'showPossibleLocalizationRecords' => TRUE,
'showAllLocalizationLink' => TRUE,
'showSynchronizationLink' => TRUE,
'enabledControls' => array(
'new' => FALSE,
'localize' => TRUE,
'sort' => FALSE,
'hide' => TRUE
)
),
'behaviour' => array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
)
),
)
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('tt_content', ',--div--;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tabs.relation,tx_flux_parent,tx_flux_column,tx_flux_children;LLL:EXT:flux/Resources/Private/Language/locallang.xlf:tt_content.tx_flux_children,,,');
\FluidTYPO3\Flux\Core::registerConfigurationProvider('FluidTYPO3\Flux\Provider\ContentProvider');