import org.argeo.api.cms.ux.CmsView;
import org.argeo.cms.util.CurrentSubject;
+/** Utilities around UX. */
public class CmsUxUtils {
public static ContentSession getContentSession(ContentRepository contentRepository, CmsView cmsView) {
return CurrentSubject.callAs(cmsView.getCmsSession().getSubject(), () -> contentRepository.get());
return content.getName().getLocalPart();
}
- /** singleton */
- private CmsUxUtils() {
-
- }
-
public static StringBuilder imgBuilder(String src, String width, String height) {
return new StringBuilder(64).append("<img width='").append(width).append("' height='").append(height)
.append("' src='").append(src).append("'");
public static String img(String src, Cms2DSize size) {
return img(src, Integer.toString(size.width()), Integer.toString(size.height()));
}
+
+ /** singleton */
+ private CmsUxUtils() {
+
+ }
+
}