Class Navigation
The Navigation API
Allows you to add navbar links/dividers/labels.
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
|
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
Link
|
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
Throws
Link
|
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
Link
|
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
|
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
|
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
|