Class Button
Button helper renders different foundation buttons
Methods summary
public static
string
|
#
button( string $label = 'button', array $htmlOptions = array() )
Generates a button
Parameters
- $label
string $label
- $htmlOptions
array $htmlOptions
Returns
string the generated button.
|
public static
string
|
#
link( string $label = 'submit', array $htmlOptions = array() )
Generates a link button.
Parameters
- $label
string $label the button label text.
- $htmlOptions
array $htmlOptions the HTML attributes for the button.
Returns
string the generated button.
|
public static
string
|
#
group( array $buttons, array $htmlOptions = array() )
Generates a group of link buttons
Generates a group of link buttons
Parameters
- $buttons
array $buttons the link buttons to render in a group
- $htmlOptions
array $htmlOptions
Returns
string
See
|
public static
string
|
#
bar( array $groups, array $htmlOptions = array() )
Generates a button bar by wrapping multiple button groups into a
button-bar
Generates a button bar by wrapping multiple button groups into a
button-bar
Parameters
- $groups
array $groups the button group to wrap
- $htmlOptions
array $htmlOptions
Returns
string
|
public static
string
|
#
btn( string $tag, string $label, array $htmlOptions = array() )
Generates a button.
Parameters
- $tag
string $tag the HTML tag.
- $label
string $label the button label text.
- $htmlOptions
array $htmlOptions additional HTML attributes.
Returns
string the generated button.
|
public static
string
|
#
dropdown( string $label, array $list, array $htmlOptions = array() )
Generates a dropdown button. Important: This method does not formats your
list items into links, you have to pass them as link tags. For a more flexible
solution use the widget.
Generates a dropdown button. Important: This method does not formats your
list items into links, you have to pass them as link tags. For a more flexible
solution use the widget.
Parameters
- $label
string $label
- $list
array $list of link items to be displayed on the dropdown menu
- $htmlOptions
array $htmlOptions the HTML attributes. It allows a special attribute
dropHtmlOptions to set your custom attributes to the dropdown list.
Returns
string
|
public static
string
|
#
split( mixed $label, mixed $list, array $htmlOptions = array() )
Generates a split button. Important: Currently split buttons require the
dropdown list items to be rendered before the body tag, so the dropdown list
hides on document.click. You will have to click again on dropdown to hide the
list. Please, use the button widget for better performance. At the moment,
Foundation uses a hack until its new release 4.2
Generates a split button. Important: Currently split buttons require the
dropdown list items to be rendered before the body tag, so the dropdown list
hides on document.click. You will have to click again on dropdown to hide the
list. Please, use the button widget for better performance. At the moment,
Foundation uses a hack until its new release 4.2
Parameters
- $label
mixed $label
- $list
mixed $list
- $htmlOptions
array $htmlOptions
Returns
string
|
Magic methods summary