Example usage for com.liferay.portal.kernel.theme ThemeDisplay isShowLayoutTemplatesIcon

List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay isShowLayoutTemplatesIcon

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme ThemeDisplay isShowLayoutTemplatesIcon.

Prototype

public boolean isShowLayoutTemplatesIcon() 

Source Link

Usage

From source file:com.liferay.layout.admin.web.internal.control.menu.ManageLayoutProductNavigationControlMenuEntry.java

License:Open Source License

@Override
public boolean isShow(HttpServletRequest request) throws PortalException {
    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);

    Layout layout = themeDisplay.getLayout();

    if (layout.isTypeControlPanel()) {
        return false;
    }/*from   w  w w . j a v a 2s . co m*/

    if (!(themeDisplay.isShowLayoutTemplatesIcon() || themeDisplay.isShowPageSettingsIcon())) {

        return false;
    }

    return super.isShow(request);
}