NAME

Whatbot::Helper::Bootstrap::Link - Represents a Bootstrap link.

SYNOPSIS

 my $link = Whatbot::Helper::Bootstrap::Link->new({
	'title' => 'Example',
	'href'  => '#',
 });
 $link->class('important');
 print $link->render();

DESCRIPTION

The Link class represents a Bootstrap link. The basic link looks like any other HTML href anchor, but can be extended with a class, role, or adding a dropdown. This class is used by Whatbot::Helper::Bootstrap to render the top navbar.

PUBLIC ACCESSORS

title

The title or label of the link.

href

The href attribute of the anchor tag.

class

The class attribute, as a string.

role

The role attribute, as a string.

An ArrayRef of Link objects. If one is added, the link will render with a dropdown menu.

PUBLIC METHODS

Add a dropdown item to the dropdown_items arrayref. Must be a Link.

has_dropdown_items()

Return true if dropdown items exist in the dropdown_items arrayref.

render()

Render the link as a string, with the current set of attributes.

LICENSE/COPYRIGHT

Be excellent to each other and party on, dudes.