@@ -28,107 +28,108 @@ public function initializeArguments(): void
2828
2929 public function render (): string
3030 {
31+ $ info = '' ;
3132 $ configurationManager = GeneralUtility::makeInstance (ConfigurationManager::class);
3233 $ ts = $ configurationManager ->getConfiguration (ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT );
33- $ config = $ ts ['page. ' ]['10. ' ]['settings. ' ]['config. ' ];
34- $ backendLayout = !empty ($ this ->arguments ['backendLayout ' ]) ? $ this ->arguments ['backendLayout ' ] : '' ;
35- $ record = !empty ($ this ->arguments ['record ' ]) ? $ this ->arguments ['record ' ] : '' ;
36- $ info = '' ;
37-
38- if ( $ record ['hidden ' ] === 0 ) {
34+ if (!empty ($ ts ['page. ' ]['10. ' ]['settings. ' ]['config. ' ])) {
35+ $ config = $ ts ['page. ' ]['10. ' ]['settings. ' ]['config. ' ];
36+ $ backendLayout = !empty ($ this ->arguments ['backendLayout ' ]) ? $ this ->arguments ['backendLayout ' ] : '' ;
37+ $ record = !empty ($ this ->arguments ['record ' ]) ? $ this ->arguments ['record ' ] : '' ;
3938
40- $ pageContainer = !empty ($ this ->arguments ['pageContainer ' ]) ? $ this ->arguments ['pageContainer ' ] : '' ;
41- $ container = !empty ($ record ['tx_t3sbootstrap_container ' ]) ? $ record ['tx_t3sbootstrap_container ' ] : '' ;
42- $ jumbotronContainer = !empty ($ config ['jumbotronContainer ' ]) ? $ config ['jumbotronContainer ' ] : '' ;
43- $ footerContainer = !empty ($ config ['footerContainer ' ]) ? $ config ['footerContainer ' ] : '' ;
44- $ expandedContentTopContainer = !empty ($ config ['expandedcontentContainertop ' ]) ? $ config ['expandedcontentContainertop ' ] : '' ;
45- $ expandedContentBottomContainer = !empty ($ config ['expandedcontentContainerbottom ' ]) ? $ config ['expandedcontentContainerbottom ' ] : '' ;
39+ if ( $ record ['hidden ' ] === 0 ) {
40+
41+ $ pageContainer = !empty ($ this ->arguments ['pageContainer ' ]) ? $ this ->arguments ['pageContainer ' ] : '' ;
42+ $ container = !empty ($ record ['tx_t3sbootstrap_container ' ]) ? $ record ['tx_t3sbootstrap_container ' ] : '' ;
43+ $ jumbotronContainer = !empty ($ config ['jumbotronContainer ' ]) ? $ config ['jumbotronContainer ' ] : '' ;
44+ $ footerContainer = !empty ($ config ['footerContainer ' ]) ? $ config ['footerContainer ' ] : '' ;
45+ $ expandedContentTopContainer = !empty ($ config ['expandedcontentContainertop ' ]) ? $ config ['expandedcontentContainertop ' ] : '' ;
46+ $ expandedContentBottomContainer = !empty ($ config ['expandedcontentContainerbottom ' ]) ? $ config ['expandedcontentContainerbottom ' ] : '' ;
47+
48+ $ extraClass = $ record ['tx_t3sbootstrap_extra_class ' ];
49+ $ frame = $ record ['frame_class ' ] === 'default ' ? '' : $ record ['frame_class ' ];
50+ $ layout = $ record ['layout ' ] === 0 ? '' : $ record ['layout ' ];
51+ $ colPos = $ record ['colPos ' ];
52+ $ oneColLayout = $ backendLayout === 'OneCol ' || $ backendLayout === 'OneCol_Extra ' ? TRUE : FALSE ;
53+
54+ if (!empty ($ container )) {
4655
47- $ extraClass = $ record ['tx_t3sbootstrap_extra_class ' ];
48- $ frame = $ record [ ' frame_class ' ] === ' default ' ? '' : $ record [ ' frame_class ' ] ;
49- $ layout = $ record [ ' layout ' ] === 0 ? '' : $ record [ ' layout ' ];
50- $ colPos = $ record [ ' colPos ' ];
51- $ oneColLayout = $ backendLayout === ' OneCol ' || $ backendLayout === ' OneCol_Extra ' ? TRUE : FALSE ;
52-
53- if (!empty ($ container )) {
54-
55- if ( $ record [ ' CType ' ] === ' background_wrapper ' ) {
56- $ info .= ' <strong>Container (inside):</strong> ' . $ container . ' ' ;
57- } else {
58-
59- if ( $ colPos === 0 ) {
60- if ($ oneColLayout ) {
61- if (!empty ($ pageContainer ) ) {
56+ if ( $ record ['CType ' ] === ' background_wrapper ' ) {
57+ $ info .= ' <strong>Container (inside):</strong> ' . $ container . ' ' ;
58+ } else {
59+
60+ if ( $ colPos === 0 ) {
61+ if ( $ oneColLayout ) {
62+ if (!empty ($ pageContainer )) {
63+ $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
64+ }
65+ } else {
66+ $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
67+ }
68+ }
69+ if ($ colPos === 3 ) {
70+ if (!empty ($ jumbotronContainer ) && $ jumbotronContainer !== ' none ' ) {
6271 $ container = '<span class="text-danger"> ' . $ container . '</span> ' ;
6372 }
64- } else {
65- $ container = '<span class="text-danger"> ' . $ container . '</span> ' ;
6673 }
67- }
68- if ($ colPos === 3 ) {
69- if (! empty ( $ jumbotronContainer ) && $ jumbotronContainer !== ' none ' ) {
70- $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
74+ if ( $ colPos === 4 ) {
75+ if (! empty ( $ footerContainer ) && $ footerContainer !== ' none ' ) {
76+ $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
77+ }
7178 }
72- }
73- if ($ colPos === 4 ) {
74- if (! empty ( $ footerContainer ) && $ footerContainer !== ' none ' ) {
75- $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
79+ if ( $ colPos === 20 ) {
80+ if (! empty ( $ expandedContentTopContainer ) ) {
81+ $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
82+ }
7683 }
77- }
78- if ($ colPos === 20 ) {
79- if (! empty ( $ expandedContentTopContainer )) {
80- $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
84+ if ( $ colPos === 21 ) {
85+ if (! empty ( $ expandedContentBottomContainer ) ) {
86+ $ container = ' <span class="text-danger"> ' . $ container . ' </span> ' ;
87+ }
8188 }
89+
90+ $ info .= '<strong>Container:</strong> ' .$ container .' ' ;
8291 }
83- if ($ colPos === 21 ) {
84- if (!empty ($ expandedContentBottomContainer )) {
85- $ container = '<span class="text-danger"> ' . $ container . '</span> ' ;
86- }
87- }
88-
89- $ info .= '<strong>Container:</strong> ' .$ container .' ' ;
90- }
91-
92- }
93-
94- if (!empty ($ extraClass )) {
95- if (!empty ($ info )) {$ info .= ' | ' ;}
96- $ info .= '<strong>Extra Class:</strong> ' .$ extraClass .' ' ;
97- }
98- if (!empty ($ layout )) {
99- if (!empty ($ info )) {$ info .= ' | ' ;}
100- $ info .= '<strong>Layout:</strong> ' .$ layout .' ' ;
101- }
102- if (!empty ($ frame )) {
103- if (!empty ($ info )) {$ info .= ' | ' ;}
104- $ info .= '<strong>Frame:</strong> ' .$ frame .' ' ;
105- }
10692
93+ }
10794
108- if ( $ GLOBALS ['BE_USER ' ]->isAdmin () ) {
109-
110- $ css = $ record ['tx_t3sbootstrap_css ' ];
111- $ js = $ record ['tx_t3sbootstrap_js ' ];
112-
113- if (!empty ($ css ) || !empty ($ js )) {
114-
95+ if (!empty ($ extraClass )) {
11596 if (!empty ($ info )) {$ info .= ' | ' ;}
116- $ info .= '<span class="text-danger">Contains custom ' ;
97+ $ info .= '<strong>Extra Class:</strong> ' .$ extraClass .' ' ;
98+ }
99+ if (!empty ($ layout )) {
100+ if (!empty ($ info )) {$ info .= ' | ' ;}
101+ $ info .= '<strong>Layout:</strong> ' .$ layout .' ' ;
102+ }
103+ if (!empty ($ frame )) {
104+ if (!empty ($ info )) {$ info .= ' | ' ;}
105+ $ info .= '<strong>Frame:</strong> ' .$ frame .' ' ;
106+ }
107+
108+
109+ if ( $ GLOBALS ['BE_USER ' ]->isAdmin () ) {
117110
118- if (!empty ($ css ) && !empty ($ js )) {
119- $ info .= 'CSS & JS ' ;
120- }
121- if (!empty ($ css )) {
122- $ info .= 'CSS ' ;
123- }
124- if (!empty ($ js )) {
125- $ info .= 'JS ' ;
111+ $ css = $ record ['tx_t3sbootstrap_css ' ];
112+ $ js = $ record ['tx_t3sbootstrap_js ' ];
113+
114+ if (!empty ($ css ) || !empty ($ js )) {
115+
116+ if (!empty ($ info )) {$ info .= ' | ' ;}
117+ $ info .= '<span class="text-danger">Contains custom ' ;
118+
119+ if (!empty ($ css ) && !empty ($ js )) {
120+ $ info .= 'CSS & JS ' ;
121+ }
122+ if (!empty ($ css )) {
123+ $ info .= 'CSS ' ;
124+ }
125+ if (!empty ($ js )) {
126+ $ info .= 'JS ' ;
127+ }
128+ $ info .= '</span> ' ;
126129 }
127- $ info .= '</span> ' ;
128130 }
129131 }
130-
131- }
132+ }
132133
133134 return $ info ;
134135 }
0 commit comments