Package com.liferay.portal.kernel.theme
Class NavItem
Object
com.liferay.portal.kernel.theme.NavItem
- All Implemented Interfaces:
Serializable
Represents a portal navigation item, providing access to layouts and metadata
from templates, which can be found in a theme's
portal-normal.vm
.- Author:
- Brian Wing Shun Chan, Shuyang Zhou
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNavItem
(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay, Layout layout) -
Method Summary
Modifier and TypeMethodDescriptionboolean
fromLayouts
(javax.servlet.http.HttpServletRequest httpServletRequest, List<Layout> parentLayouts, ThemeDisplay themeDisplay) Returns all of the browsable child layouts that the current user has permission to access from this navigation item's layout.Returns all of child layouts that the current user has permission to access from this navigation item's layout.Returns the navigation item's layout.long
Returns the ID of the navigation item's layout.getName()
Returns the HTML-escaped name of the navigation item's layout.Returns the full, absolute URL (including the portal's URL) of the navigation item's layout.Returns the regular URL of the navigation item's layout.Returns the target of the navigation item's layout.getTitle()
Returns the title of the navigation item's layout in the current request's locale.Returns the unescaped name of the navigation item's layout in the current request's locale.getURL()
Returns the URL of the navigation item's layout, in a format that makes it safe to use the URL as an HREF attribute valueboolean
Returnstrue
if the navigation item's layout has browsable child layouts.boolean
Returnstrue
if the navigation item's layout has child layouts.int
hashCode()
iconURL()
boolean
boolean
boolean
isInNavigation
(List<NavItem> navItems) boolean
-
Constructor Details
-
NavItem
-
NavItem
public NavItem(javax.servlet.http.HttpServletRequest httpServletRequest, ThemeDisplay themeDisplay, Layout layout)
-
-
Method Details
-
fromLayouts
public static List<NavItem> fromLayouts(javax.servlet.http.HttpServletRequest httpServletRequest, List<Layout> parentLayouts, ThemeDisplay themeDisplay) throws PortalException - Throws:
PortalException
-
equals
-
getBrowsableChildren
Returns all of the browsable child layouts that the current user has permission to access from this navigation item's layout.- Returns:
- the list of all browsable child layouts that the current user has permission to access from this navigation item's layout
- Throws:
Exception
- if an exception occurred
-
getChildren
Returns all of child layouts that the current user has permission to access from this navigation item's layout.- Returns:
- the list of all child layouts that the current user has permission to access from this navigation item's layout
- Throws:
Exception
- if an exception occurred
-
getDisplayIcon
- Throws:
Exception
-
getExpandoAttributes
-
getLayout
Returns the navigation item's layout.- Returns:
- the navigation item's layout
-
getLayoutId
public long getLayoutId()Returns the ID of the navigation item's layout.- Returns:
- the ID of the navigation item's layout
-
getName
Returns the HTML-escaped name of the navigation item's layout.- Returns:
- the HTML-escaped name of the navigation item's layout
-
getRegularFullURL
Returns the full, absolute URL (including the portal's URL) of the navigation item's layout.- Returns:
- the full, absolute URL of the navigation item's layout
- Throws:
Exception
- if an exception occurred
-
getRegularURL
Returns the regular URL of the navigation item's layout.- Returns:
- the regular URL of the navigation item's layout
- Throws:
Exception
- if an exception occurred
-
getResetLayoutURL
- Throws:
Exception
-
getResetMaxStateURL
- Throws:
Exception
-
getTarget
Returns the target of the navigation item's layout.- Returns:
- the target of the navigation item's layout
-
getTitle
Returns the title of the navigation item's layout in the current request's locale.- Returns:
- the title of the navigation item's layout in the current request's locale
-
getUnescapedName
Returns the unescaped name of the navigation item's layout in the current request's locale.- Returns:
- the unescaped name of the navigation item's layout in the current request's locale
-
getURL
Returns the URL of the navigation item's layout, in a format that makes it safe to use the URL as an HREF attribute value- Returns:
- the URL of the navigation item's layout, in a format that makes it safe to use the URL as an HREF attribute value
- Throws:
Exception
- if an exception occurred
-
hasBrowsableChildren
Returnstrue
if the navigation item's layout has browsable child layouts.- Returns:
true
if the navigation item's layout has browsable child layouts;false
otherwise- Throws:
Exception
- if an exception occurred
-
hasChildren
Returnstrue
if the navigation item's layout has child layouts.- Returns:
true
if the navigation item's layout has child layouts;false
otherwise- Throws:
Exception
- if an exception occurred
-
hashCode
public int hashCode() -
iconURL
- Throws:
Exception
-
isBrowsable
public boolean isBrowsable() -
isChildSelected
- Throws:
PortalException
-
isSelected
- Throws:
Exception
-