forked from FluidTYPO3/fluidpages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
144 lines (130 loc) · 6.61 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fluidpages']['setup'] = unserialize($_EXTCONF);
if (TRUE === isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fluidpages']['setup']['autoload']) && FALSE === (boolean) $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fluidpages']['setup']['autoload']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Fluidpages PAGE rendering');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', array(
'tx_fed_page_controller_action' => array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_controller_action',
'config' => array (
'type' => 'user',
'userFunc' => 'FluidTYPO3\Fluidpages\Backend\PageLayoutSelector->renderField'
)
),
'tx_fed_page_controller_action_sub' => array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_controller_action_sub',
'config' => array (
'type' => 'user',
'userFunc' => 'FluidTYPO3\Fluidpages\Backend\PageLayoutSelector->renderField'
)
),
'tx_fed_page_flexform' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_flexform',
'config' => array (
'type' => 'flex',
)
),
'tx_fed_page_flexform_sub' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_flexform_sub',
'config' => array (
'type' => 'flex',
)
),
), 1);
$doktypeIcon = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('fluidpages') . 'doktype_icon.png';
$GLOBALS['PAGES_TYPES'][\FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW] = array(
'type' => 'web',
'icon' => $doktypeIcon,
'allowedTables' => '*'
);
$GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'][] = array(
'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.doktype.' . \FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW,
\FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW,
$doktypeIcon
);
$GLOBALS['TCA']['pages_language_overlay']['columns']['doktype']['config']['items'][] = array(
'LLL:EXT:examples/Resources/Private/Language/locallang.xml:pages.doktype.' . \FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW,
\FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW,
$doktypeIcon
);
$GLOBALS['TCA']['pages']['types'][\FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW]['showitem'] = '--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.standard;standard,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.title;title,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.access,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.visibility;visibility,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.access;access,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.metadata,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.abstract;abstract,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.metatags;metatags,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.editorial;editorial,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.behaviour,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.links;links,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.caching;caching,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.language;language,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.miscellaneous;miscellaneous,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.module;module,
--div--;LLL:EXT:cms/locallang_tca.xlf:pages.tabs.resources,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.media;media,
--palette--;LLL:EXT:cms/locallang_tca.xlf:pages.palettes.storage;storage,
--div--;LLL:EXT:lang/locallang_tca.xlf:sys_category.tabs.category, categories';
\TYPO3\CMS\Backend\Sprite\SpriteManager::addTcaTypeIcon('pages', \FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW, $doktypeIcon);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig(
'options.pageTree.doktypesToShowInNewPageDragArea := addToList(' . \FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW . ')'
);
$doktypes = '0,1,4';
$additionalDoktypes = trim($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['fluidpages']['setup']['doktypes'], ',');
if (FALSE === empty($additionalDoktypes)) {
$doktypes .= ',' . $additionalDoktypes;
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_layoutselect,tx_fed_page_controller_action,tx_fed_page_controller_action_sub',
$doktypes
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'pages',
'--div--;LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fed_page_configuration,tx_fed_page_flexform,tx_fed_page_flexform_sub',
$doktypes
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', array(
'tx_fluidpages_templatefile' => array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fluidpages_templatefile',
'config' => array (
'type' => 'input',
'eval' => 'trim',
'placeholder' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fluidpages_templatefile.placeholder',
'wizards' => array(
'_PADDING' => 2,
'link' => array(
'type' => 'popup',
'title' => 'LLL:EXT:cms/locallang_ttc.xml:header_link_formlabel',
'icon' => 'link_popup.gif',
'script' => 'browse_links.php?mode=wizard&act=file',
'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1',
),
)
)
),
'tx_fluidpages_layout' => array (
'exclude' => 1,
'label' => 'LLL:EXT:fluidpages/Resources/Private/Language/locallang.xml:pages.tx_fluidpages_layout',
'displayCond' => 'FIELD:tx_fluidpages_templatefile:!=:',
'config' => array (
'type' => 'select',
'itemsProcFunc' => 'FluidTYPO3\Fluidpages\Backend\TemplateFileLayoutSelector->addLayoutOptions',
'arguments' => array(
'referring_field' => 'tx_fluidpages_templatefile'
)
)
),
));
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', 'tx_fluidpages_templatefile, tx_fluidpages_layout', \FluidTYPO3\Fluidpages\Controller\PageControllerInterface::DOKTYPE_RAW, 'before:title');
$GLOBALS['TCA']['pages']['ctrl']['requestUpdate'] .= ',tx_fluidpages_templatefile';
unset($doktypes, $additionalDoktypes, $doktypeIcon);