Constants

CTX_DEFAULT

CTX_DEFAULT

CTX_PRIMARY

CTX_PRIMARY

CTX_SUCCESS

CTX_SUCCESS

CTX_INFO

CTX_INFO

CTX_WARNING

CTX_WARNING

CTX_DANGER

CTX_DANGER

CTX_DEFAULT_CLASS

CTX_DEFAULT_CLASS

CTX_PRIMARY_CLASS

CTX_PRIMARY_CLASS

CTX_SUCCESS_CLASS

CTX_SUCCESS_CLASS

CTX_INFO_CLASS

CTX_INFO_CLASS

CTX_WARNING_CLASS

CTX_WARNING_CLASS

CTX_DANGER_CLASS

CTX_DANGER_CLASS

BUTTON_BUTTON

BUTTON_BUTTON

BUTTON_SUBMIT

BUTTON_SUBMIT

BUTTON_RESET

BUTTON_RESET

BUTTON_AJAXBUTTON

BUTTON_AJAXBUTTON

BUTTON_AJAXSUBMIT

BUTTON_AJAXSUBMIT

BUTTON_INPUTBUTTON

BUTTON_INPUTBUTTON

BUTTON_INPUTSUBMIT

BUTTON_INPUTSUBMIT

BUTTON_TOGGLE_RADIO

BUTTON_TOGGLE_RADIO

BUTTON_TOGGLE_CHECKBOX

BUTTON_TOGGLE_CHECKBOX

SIZE_LARGE

SIZE_LARGE

SIZE_DEFAULT

SIZE_DEFAULT

SIZE_SMALL

SIZE_SMALL

SIZE_EXTRA_SMALL

SIZE_EXTRA_SMALL

Properties

$context

$context : string

easily make a widget more meaningful to a particular context by adding any of the contextual state classes

Type

string

$buttonType

$buttonType : string

Type

string — the button callback types. Valid values are 'link', 'button', 'submit', 'submitLink', 'reset', 'ajaxLink', 'ajaxButton' and 'ajaxSubmit'.

$size

$size : string

Type

string — the button size. Valid values are 'large', 'small' and 'mini'.

$icon

$icon : string

Type

string — the button icon, e.g. 'ok' or 'remove white'.

$label

$label : string

Type

string — the button label.

$url

$url : string

Type

string — the button URL.

$block

$block : boolean

Type

boolean — indicates whether the button should span the full width of the a parent.

$active

$active : boolean

Type

boolean — indicates whether the button is active.

$disabled

$disabled : boolean

Type

boolean — indicates whether the button is disabled.

$encodeLabel

$encodeLabel : boolean

Type

boolean — indicates whether to encode the label.

$toggle

$toggle : boolean

Type

boolean — indicates whether to enable toggle.

$loadingText

$loadingText : string

Type

string — the loading text.

$completeText

$completeText : string

Type

string — the complete text.

$items

$items : array

Type

array — the dropdown button items.

$htmlOptions

$htmlOptions : array

Type

array — the HTML attributes for the widget container.

$ajaxOptions

$ajaxOptions : array

Type

array — the button ajax options (used by 'ajaxLink' and 'ajaxButton').

$dropdownOptions

$dropdownOptions : array

Type

array — the HTML attributes for the dropdown menu.

$visible

$visible : bool

Type

bool — whether the button is visible or not

$tooltip

$tooltip : bool

Tooltip for button

Type

bool

$tooltipOptions

$tooltipOptions : array

Tooltip options

Type

array

$sizeClasses

$sizeClasses

Methods

init()

init()

### .init()

Initializes the widget.

run()

run()

### .run()

Runs the widget.

addCssClass()

addCssClass(array $htmlOptions, string $class)

Utility function for appending class names for a generic $htmlOptions array.

Parameters

array $htmlOptions
string $class

isValidContext()

isValidContext( $cotext)

Parameters

$cotext

getContextClass()

getContextClass(string $context)

Parameters

string $context

createButton()

createButton() : string

### .createButton()

Creates the button element.

Returns

string —

the created button.

createToggleButton()

createToggleButton( $toggleType)

Parameters

$toggleType

hasDropdown()

hasDropdown() : bool

### .hasDropdown()

Returns whether the button has a dropdown.

Returns

bool —

the result.