Jet\Navigation_Breadcrumb

The main class, representing the breadcrumb navigation as such, holds a list of items and allows you to operate on them.

Overview of methods

Method Meaning of
public static setByPage(
MVC_Page_Interface $page=null
) : void
Sets the breadcrumb navigation according to the given page. In practice, this means that existing items are removed and the given page and all its parent pages are added to the breadcrumb navigation.

If the page is not specified, then the current page is used.
public static set(
Navigation_Breadcrumb_Item[] $items=[]
) : void
Sets the passed items as the current form of breadcrumb navigation.
public static addItem(
Navigation_Breadcrumb_Item $item
) : void
It adds item to the current breadcrumb navigation items.

If there was no setting of the breadcrumb navigation by the set method, then the setByPage method is called first.
public static addURL(
string $title,
string $URL=''
) : Navigation_Breadcrumb_Item
Creates a new item, sets the title and URL, adds it to the current items, and returns its instance.
public static addPage(
MVC_Page_Interface $page
) : Navigation_Breadcrumb_Item
Creates a new item, sets it to the given page, adds it to the current items and returns its instance.
public static getItems(
) : Navigation_Breadcrumb_Item[]
Returns all the current items.

If there was no set of breadcrumb navigation by the set method, then the setByPage method is called first.
public static getCurrentLastItem(
) : Navigation_Breadcrumb_Item
Returns the current last item.
public static reset(
) : void
Completely removes the current breadcrumb navigation settings.
public static shift(
int $shift_count
) : void
Removes the given number of items from the beginning of the list.
Previous chapter
Breadcrumb navigation
Next chapter
Jet\Navigation_Breadcrumb_Item