-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtt_content.php
More file actions
74 lines (70 loc) · 2.96 KB
/
tt_content.php
File metadata and controls
74 lines (70 loc) · 2.96 KB
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
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
(
new \B13\Container\Tca\ContainerConfiguration(
'b13-2cols-with-header-container', // CType
'2 Column Container With Header', // label
'Some Description of the Container', // description
[
[
['name' => 'header', 'colPos' => 200, 'colspan' => 2, 'allowed' => ['CType' => 'header, textmedia, b13-2cols']]
],
[
['name' => 'left side', 'colPos' => 201],
['name' => 'right side', 'colPos' => 202, 'maxitems' => 1]
]
] // grid configuration
)
)
// override default configurations
->setIcon('EXT:container_example/Resources/Public/Icons/b13-2cols-with-header-container.svg')
->setSaveAndCloseInNewContentElementWizard(false)
->setDefaultValues(['header' => 'my-default-value-header'])
);
// override default settings
$GLOBALS['TCA']['tt_content']['types']['b13-2cols-with-header-container']['showitem'] = 'sys_language_uid,CType,header,tx_container_parent,colPos';
// second container
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
(
new \B13\Container\Tca\ContainerConfiguration(
'b13-2cols', // CType
'2 Column', // label
'Some Description of the Container', // description
[
[
['name' => '2-cols-left', 'colPos' => 200, 'maxitems' => 1],
['name' => '2-cols-right', 'colPos' => 201, 'allowed' => ['CType' => 'header']]
]
] // grid configuration
)
)->setBackendTemplate('EXT:container_example/Resources/Private/Templates/BackendTemplate.html')
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
(
new \B13\Container\Tca\ContainerConfiguration(
'b13-1col', // CType
'1 Column', // label
'Some Description of the Container', // description
[
[
['name' => 'content', 'colPos' => 200],
]
] // grid configuration
)
)->setRegisterInNewContentElementWizard(false)
);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
(
new \B13\Container\Tca\ContainerConfiguration(
'b13-2cols-content-area', // CType
'2 Column (ContentArea)', // label
'Some Description of the Container', // description
[
[
['name' => '2-cols-left', 'colPos' => 200],
['name' => '2-cols-right', 'colPos' => 201]
]
] // grid configuration
)
)->setBackendTemplate('EXT:container_example/Resources/Private/Templates/BackendTemplate.html')
);