@@ -53,7 +53,6 @@ public function generateTsConfig($json)
53
53
54
54
// make content-Elements
55
55
if ($ json ["tt_content " ]["elements " ]) {
56
-
57
56
foreach ($ json ["tt_content " ]["elements " ] as $ element ) {
58
57
// Register icons for contentelements
59
58
$ iconIdentifier = 'mask-ce- ' . $ element ["key " ];
@@ -62,20 +61,22 @@ public function generateTsConfig($json)
62
61
'contentElementKey ' => $ element ["key " ]
63
62
)
64
63
);
65
- $ temp = str_replace ("###ICON### " , "iconIdentifier = " . $ iconIdentifier , $ template );
66
- $ temp = str_replace ("###KEY### " , $ element ["key " ], $ temp );
67
- $ temp = str_replace ("###LABEL### " , $ element ["label " ], $ temp );
68
- $ temp = str_replace ("###DESCRIPTION### " , $ element ["description " ], $ temp );
69
- $ content .= $ temp ;
64
+ if (!$ element ["hidden " ]) {
65
+ $ temp = str_replace ("###ICON### " , "iconIdentifier = " . $ iconIdentifier , $ template );
66
+ $ temp = str_replace ("###KEY### " , $ element ["key " ], $ temp );
67
+ $ temp = str_replace ("###LABEL### " , $ element ["label " ], $ temp );
68
+ $ temp = str_replace ("###DESCRIPTION### " , $ element ["description " ], $ temp );
69
+ $ content .= $ temp ;
70
70
71
- // Labels
72
- $ content .= "\n[userFunc = user_mask_contentType(CType|mask_ " . $ element ["key " ] . ")] \n" ;
73
- if ($ element ["columns " ]) {
74
- foreach ($ element ["columns " ] as $ index => $ column ) {
75
- $ content .= " TCEFORM.tt_content. " . $ column . ".label = " . $ element ["labels " ][$ index ] . "\n" ;
71
+ // Labels
72
+ $ content .= "\n[userFunc = user_mask_contentType(CType|mask_ " . $ element ["key " ] . ")] \n" ;
73
+ if ($ element ["columns " ]) {
74
+ foreach ($ element ["columns " ] as $ index => $ column ) {
75
+ $ content .= " TCEFORM.tt_content. " . $ column . ".label = " . $ element ["labels " ][$ index ] . "\n" ;
76
+ }
76
77
}
78
+ $ content .= "[end] \n\n" ;
77
79
}
78
- $ content .= "[end] \n\n" ;
79
80
}
80
81
}
81
82
return $ content ;
@@ -162,9 +163,11 @@ classes {
162
163
// Fill setup.ts:
163
164
if ($ configuration ["tt_content " ]["elements " ]) {
164
165
foreach ($ configuration ["tt_content " ]["elements " ] as $ element ) {
165
- $ temp = str_replace ("###KEY### " , $ element ["key " ], $ template );
166
- $ temp = str_replace ("###PATH### " , $ settings ['content ' ] . $ element ["key " ] . '.html ' , $ temp );
167
- $ setupContent .= $ temp ;
166
+ if (!$ element ["hidden " ]) {
167
+ $ temp = str_replace ("###KEY### " , $ element ["key " ], $ template );
168
+ $ temp = str_replace ("###PATH### " , $ settings ['content ' ] . $ element ["key " ] . '.html ' , $ temp );
169
+ $ setupContent .= $ temp ;
170
+ }
168
171
}
169
172
}
170
173
return $ setupContent ;
0 commit comments