Button
Button HTML custom widget.
Tags
Table of Contents
- $action : string
- The Javascript action to carry out when the button is pressed.
- $glyphIcon : string
- If provided, the Bootsrap glyphIcon to use for this button.
- $id : string
- The HTML id attribute for the button.
- $imgURL : string
- If provided, the button will be a clickable image using this image.
- $title : string
- The title to display on the button.
- $tooltip : string
- If provided, the Bootsrap tooltip to use for this button.
- $tooltipPosition : string
- If provided, the Bootsrap tooltip position (left|right|top|bottom) to use for this button.
- __construct() : mixed
- The constructor.
- render() : string
- Renders the HTML and javascript for the button.
Properties
$action
The Javascript action to carry out when the button is pressed.
private
string
$action
Tags
$glyphIcon
If provided, the Bootsrap glyphIcon to use for this button.
private
string
$glyphIcon
Tags
$id
The HTML id attribute for the button.
private
string
$id
Tags
$imgURL
If provided, the button will be a clickable image using this image.
private
string
$imgURL
Tags
$title
The title to display on the button.
private
string
$title
Tags
$tooltip
If provided, the Bootsrap tooltip to use for this button.
private
string
$tooltip
Tags
$tooltipPosition
If provided, the Bootsrap tooltip position (left|right|top|bottom) to use for this button.
private
string
$tooltipPosition
Tags
Methods
__construct()
The constructor.
public
__construct(string $action, string $title, string $id[, string $imgURL = '' ][, string $glyphIcon = '' ][, string $tooltip = '' ][, string $tooltipPosition = '' ]) : mixed
Parameters
- $action : string
-
The javascript action to be carried out (or set to "submit" to make a submit button, "file" for file uploads).
- $title : string
-
The title to appear on the button.
- $id : string
-
The HTML id attribute for the button.
- $imgURL : string = ''
-
If provided, the button will be a clickable image using this image.
- $glyphIcon : string = ''
-
If provided, the Bootsrap glyphIcon to use for this button.
- $tooltip : string = ''
-
If provided, the Bootsrap tooltip to use for this button.
- $tooltipPosition : string = ''
-
If provided, the Bootsrap tooltip position (left|right|top|bottom) to use for this button.
Tags
Return values
mixed —render()
Renders the HTML and javascript for the button.
public
render(int $width[, string $cssClasses = '' ]) : string
Parameters
- $width : int
-
The width in pixels of the button (will also accept percentage values), defaults to 0 meaning auto-width to fit text.
- $cssClasses : string = ''
-
List of CSS classes to apply to the button (optional)