Class Menu

    • Constructor Detail

      • Menu

        public Menu​(Site site,
                    org.fenixedu.commons.i18n.LocalizedString name)
    • Method Detail

      • delete

        public void delete()
      • isValidSlug

        public boolean isValidSlug​(String slug)
        A slug is valid if there are no other page on that site that have the same slug.
        Specified by:
        isValidSlug in interface Sluggable
        Parameters:
        slug - slug
        Returns:
        true if it is a valid slug.
      • setName

        public void setName​(org.fenixedu.commons.i18n.LocalizedString name)
        saves the name of the post and creates a new slug for the post.
        Overrides:
        setName in class Menu_Base
      • putAt

        public void putAt​(MenuItem item,
                          int position)
        Puts a MenuItem at a given position, shifting the existing ones to the right.
        Parameters:
        item - The MenuItem to be added.
        position - the position to save the item.
      • remove

        public void remove​(MenuItem mi)
        Removes a given MenuItem from the Menu.
        Parameters:
        mi - the MenuItem to be removed.
      • add

        public void add​(MenuItem mi)
        Adds a given MenuItem as the last item.
        Parameters:
        mi - the MenuItem to be added.
      • getToplevelItemsSorted

        public Stream<MenuItem> getToplevelItemsSorted()
      • makeWrap

        public Wrap makeWrap​(Page page)
      • menuItemForOid

        public MenuItem menuItemForOid​(String menuItemOid)
      • checkMenuOrder

        public boolean checkMenuOrder()