# Class Navigation

The Navigation API
Allows you to add navbar links/dividers/labels.

Namespace: Pancake
Category: Navigation
Located at Navigation.php

Methods summary
`public static` | # `registerNavbarLink( string $url, string $title, string $parent_url = null )` Add a new new navbar link. Add a new new navbar link. If $parent_url is specified, this link will be added in a submenu of the link with $url == $parent_url. #### Parameters $url `string` $url $title `string` $title $parent_url `string` $parent_url #### Throws ``Pancake\NavigationException``
`public static` | # `registerNavbarLabel( string $title, string $parent_url )` Add a new new navbar label. Add a new new navbar label. If $parent_url is specified, this label will be added in a submenu of the link with $url == $parent_url. #### Parameters $title `string` $title $parent_url `string` $parent_url #### Throws ``Pancake\NavigationException`` #### Link What a navbar label looks like
`public static` | # `registerDivider( string $parent_url )` Add a new new navbar divider. Add a new new navbar divider. If $parent_url is specified, this label will be added in a submenu of the link with $url == $parent_url. #### Parameters $parent_url `string` $title #### Throws ``Pancake\NavigationException`` #### Link What a navbar divider looks like
`public static` | # `setBadge( string $url, string $badge )` Display a number or string in a badge to the right of your link. Display a number or string in a badge to the right of your link. #### Parameters $url `string` $url $badge `string` $badge #### Throws ``Pancake\NavigationException`` #### Link What a badge looks like in the main menu What a badge looks like in submenus
`public static` | # `setClass( string $url, string $class )` Add a class to a link's <a>. Add a class to a link's <a>. #### Parameters $url `string` $url $class `string` $class #### Throws ``Pancake\NavigationException``
`public static` | # `setContainerClass( string $url, string $container_class )` Add a class to a link's container <li>. Add a class to a link's container <li>. #### Parameters $url `string` $url $container_class `string` $container_class #### Throws ``Pancake\NavigationException``
`public static` | # `setContainerDataAttributes( string $url, array $data_attributes )` Add data-* attributes to a link's container <li>. Add data-* attributes to a link's container <li>. `$data_attributes` is an array of attribute name => attribute value pairs. For example: `$data_attributes = array("attribute1" => "yes");` This will add `data-attribute1="yes"` to the specified link's container <li>. #### Parameters $url `string` $url $data_attributes `array` $data_attributes #### Throws ``Pancake\NavigationException``