PHP Class BootstrapUI\View\Helper\HtmlHelper

Inheritance: extends Cake\View\Helper\HtmlHelper, use trait OptionsAwareTrait
Show file Open project: friendsofcake/bootstrap-ui Class Usage Examples

Public Methods

Method Description
badge ( string $text, array $options = [] ) : string Returns Bootstrap badge markup. By default, uses .
getCrumbList ( array $options = [], string | array | boolean $startText = false ) : string | null Returns breadcrumbs as a (x)html list
icon ( string $name, array $options = [] ) : string Returns Bootstrap icon markup. By default, uses and glypicon.
label ( string $text, array $options = [] ) : string Returns Bootstrap label markup. By default, uses .

Method Details

badge() public method

Returns Bootstrap badge markup. By default, uses .
public badge ( string $text, array $options = [] ) : string
$text string Text to show in badge.
$options array Additional HTML attributes.
return string HTML badge markup.

getCrumbList() public method

This method uses HtmlHelper::tag() to generate list and its elements. Works similar to HtmlHelper::getCrumbs(), so it uses options which every crumb was added with. ### Options - separator Separator content to insert in between breadcrumbs, defaults to '' - firstClass Class for wrapper tag on the first breadcrumb, defaults to 'first' - lastClass Class for wrapper tag on current active page, defaults to 'last'
public getCrumbList ( array $options = [], string | array | boolean $startText = false ) : string | null
$options array Array of HTML attributes to apply to the generated list elements.
$startText string | array | boolean This will be the first crumb, if false it defaults to first crumb in array. Can also be an array, see `HtmlHelper::getCrumbs` for details.
return string | null Breadcrumbs HTML list.

icon() public method

Returns Bootstrap icon markup. By default, uses and glypicon.
public icon ( string $name, array $options = [] ) : string
$name string Name of icon (i.e. search, leaf, etc.).
$options array Additional HTML attributes.
return string HTML icon markup.

label() public method

Returns Bootstrap label markup. By default, uses .
public label ( string $text, array $options = [] ) : string
$text string Text to show in label.
$options array Additional HTML attributes.
return string HTML icon markup.