@@ -90,7 +90,7 @@ public static function getContainerAttributes(ContainerRef $containerRef): array
9090 'data-dot-identifier ' => $ containerRef ->identifier ?? '' ,
9191 'data-dot-accept-types ' => $ containerRef ->acceptTypes ?? '' ,
9292 'data-max-contentlets ' => $ containerRef ->maxContentlets ?? '' ,
93- 'data-dot-uuid ' => $ containerRef ->uuid ?? ''
93+ 'data-dot-uuid ' => $ containerRef ->uuid ?? '' ,
9494 ];
9595 }
9696
@@ -115,8 +115,8 @@ public static function getContentletAttributes(Contentlet $content, ContainerRef
115115 'identifier ' => $ containerRef ->identifier ?? '' ,
116116 'maxContentlets ' => $ containerRef ->maxContentlets ?? '' ,
117117 'variantId ' => $ containerRef ->variantId ?? '' ,
118- 'uuid ' => $ containerRef ->uuid ?? ''
119- ])
118+ 'uuid ' => $ containerRef ->uuid ?? '' ,
119+ ]),
120120 ];
121121 }
122122
@@ -140,8 +140,8 @@ public static function getGhostContentletAttributes(ContainerRef $containerRef):
140140 'identifier ' => $ containerRef ->identifier ?? '' ,
141141 'maxContentlets ' => $ containerRef ->maxContentlets ?? '' ,
142142 'variantId ' => $ containerRef ->variantId ?? '' ,
143- 'uuid ' => $ containerRef ->uuid ?? ''
144- ])
143+ 'uuid ' => $ containerRef ->uuid ?? '' ,
144+ ]),
145145 ];
146146 }
147147
@@ -179,44 +179,44 @@ public static function isEditMode(?string $mode): bool
179179 * @return string Complete container HTML
180180 */
181181 public static function renderContainer (
182- ContainerRef $ containerRef ,
183- array $ contentlets ,
182+ ContainerRef $ containerRef ,
183+ array $ contentlets ,
184184 ?string $ mode = null ,
185185 ?callable $ contentRenderer = null
186186 ): string {
187187 $ containerAttrs = self ::getContainerAttributes ($ containerRef );
188188 $ containerAttrsHtml = self ::htmlAttributes ($ containerAttrs );
189189 $ hasContentlets = !empty ($ contentlets );
190190 $ isEditMode = self ::isEditMode ($ mode );
191-
191+
192192 $ html = "<div {$ containerAttrsHtml }> " ;
193-
193+
194194 if ($ hasContentlets ) {
195195 // Render contentlets
196196 foreach ($ contentlets as $ content ) {
197197 $ contentAttrs = self ::getContentletAttributes ($ content , $ containerRef );
198198 $ contentAttrsHtml = self ::htmlAttributes ($ contentAttrs );
199-
199+
200200 $ contentHtml = '' ;
201201 if ($ contentRenderer && is_callable ($ contentRenderer )) {
202202 $ contentHtml = $ contentRenderer ($ content );
203203 } else {
204204 $ contentHtml = self ::simpleContentHtml ($ content ->jsonSerialize ());
205205 }
206-
206+
207207 $ html .= "<div {$ contentAttrsHtml }> {$ contentHtml }</div> " ;
208208 }
209209 } elseif ($ isEditMode ) {
210210 // Render empty container with ghost contentlet for UVE
211211 $ ghostAttrs = self ::getGhostContentletAttributes ($ containerRef );
212212 $ ghostAttrsHtml = self ::htmlAttributes ($ ghostAttrs );
213213 $ placeholder = self ::generateEmptyContainerPlaceholder ();
214-
214+
215215 $ html .= "<div {$ ghostAttrsHtml } class= \"uve-ghost-contentlet \"> {$ placeholder }</div> " ;
216216 }
217-
217+
218218 $ html .= '</div> ' ;
219-
219+
220220 return $ html ;
221221 }
222222
0 commit comments