List of usage examples for com.liferay.portal.util PropsValues LAYOUT_GUEST_SHOW_MIN_ICON
boolean LAYOUT_GUEST_SHOW_MIN_ICON
To view the source code for com.liferay.portal.util PropsValues LAYOUT_GUEST_SHOW_MIN_ICON.
Click Source Link
From source file:com.liferay.portlet.configuration.icon.minimize.internal.MinimizePortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); if (!GetterUtil.getBoolean(themeDisplay.getThemeSetting("show-maximize-minimize-application-links"))) { return false; }// w w w .j a v a 2 s. c o m Layout layout = themeDisplay.getLayout(); if (!layout.isTypePortlet()) { return false; } LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); LayoutTypeController layoutTypeController = layoutTypePortlet.getLayoutTypeController(); if (layoutTypeController.isFullPageDisplayable()) { return false; } Portlet portlet = (Portlet) portletRequest.getAttribute(WebKeys.RENDER_PORTLET); if (!portlet.hasWindowState(portletRequest.getResponseContentType(), WindowState.MINIMIZED)) { return false; } Group group = themeDisplay.getScopeGroup(); if (!themeDisplay.isSignedIn() || (group.hasStagingGroup() && !group.isStagingGroup()) || !hasUpdateLayoutPermission(themeDisplay)) { if (!PropsValues.LAYOUT_GUEST_SHOW_MIN_ICON) { return false; } } return true; }