@@ -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
@@ -153,8 +153,8 @@ public static function getGhostContentletAttributes(ContainerRef $containerRef):
153153 */
154154 public static function generateEmptyContainerPlaceholder (string $ message = 'This container is empty. ' ): string
155155 {
156- return '<div class="empty-container-placeholder"> ' .
157- htmlspecialchars ($ message , ENT_QUOTES , 'UTF-8 ' ) .
156+ return '<div class="empty-container-placeholder"> ' .
157+ htmlspecialchars ($ message , ENT_QUOTES , 'UTF-8 ' ) .
158158 '</div> ' ;
159159 }
160160
@@ -179,55 +179,55 @@ 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 );
189- $ hasContentlets = !empty ($ contentlets );
189+ $ hasContentlets = ! empty ($ contentlets );
190190 $ isEditMode = self ::isEditMode ($ mode );
191-
192- $ html = '' ;
193-
191+
192+ $ html = '' ;
193+
194194 // Auto-inject CSS for empty containers if we're in edit mode and need it
195- if ($ isEditMode && !$ hasContentlets ) {
195+ if ($ isEditMode && ! $ hasContentlets ) {
196196 static $ cssInjected = false ;
197- if (!$ cssInjected ) {
197+ if (! $ cssInjected ) {
198198 $ html .= '<style> ' . self ::getEmptyContainerCSS () . '</style> ' ;
199199 $ cssInjected = true ;
200200 }
201201 }
202-
202+
203203 $ html .= "<div {$ containerAttrsHtml }> " ;
204204
205205 if ($ hasContentlets ) {
206206 // Render contentlets
207207 foreach ($ contentlets as $ content ) {
208208 $ contentAttrs = self ::getContentletAttributes ($ content , $ containerRef );
209209 $ contentAttrsHtml = self ::htmlAttributes ($ contentAttrs );
210-
210+
211211 $ contentHtml = '' ;
212212 if ($ contentRenderer && is_callable ($ contentRenderer )) {
213213 $ contentHtml = $ contentRenderer ($ content );
214214 } else {
215215 $ contentHtml = self ::simpleContentHtml ($ content ->jsonSerialize ());
216216 }
217-
217+
218218 $ html .= "<div {$ contentAttrsHtml }> {$ contentHtml }</div> " ;
219219 }
220220 } elseif ($ isEditMode ) {
221221 // Render empty container with ghost contentlet for UVE
222222 $ ghostAttrs = self ::getGhostContentletAttributes ($ containerRef );
223223 $ ghostAttrsHtml = self ::htmlAttributes ($ ghostAttrs );
224224 $ placeholder = self ::generateEmptyContainerPlaceholder ();
225-
225+
226226 $ html .= "<div {$ ghostAttrsHtml } class= \"uve-ghost-contentlet \"> {$ placeholder }</div> " ;
227227 }
228-
228+
229229 $ html .= '</div> ' ;
230-
230+
231231 return $ html ;
232232 }
233233
0 commit comments