Class NavItem

java.lang.Object
org.craftercms.engine.navigation.NavItem

public class NavItem extends Object
Represents a navigation item with label, rendering URL, a flag that indicates that it's an active item (is part of the current request) and sub navigation items when applicable.
Author:
avasquez
  • Field Details

    • label

      protected String label
    • url

      protected String url
    • active

      protected boolean active
    • subItems

      protected List<NavItem> subItems
    • attributes

      protected Map<String,String> attributes
  • Constructor Details

    • NavItem

      public NavItem()
  • Method Details

    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getUrl

      public String getUrl()
    • setUrl

      public void setUrl(String url)
    • isActive

      public boolean isActive()
    • setActive

      public void setActive(boolean active)
    • getSubItems

      public List<NavItem> getSubItems()
    • setSubItems

      public void setSubItems(List<NavItem> subItems)
    • getAttributes

      public Map<String,String> getAttributes()
    • setAttributes

      public void setAttributes(Map<String,String> attributes)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object