\Hazaar\View\Widgets
CheckBox

Toggle button widget.

Tags

Since

1.1

Summary
Methods Properties Constants
set
val
No constants
Properties
Inherited
$element
$element
Inherited
$name
$name
Inherited
$script
$script
Methods
__construct()
__construct($name, $label = 'Checkbox', $params = Array ( ) )

Initialise a checkbox widget

Parameters

$name

No description

$labelstring

The label to display on the button.

$params

No description

animationHideDelay()
animationHideDelay($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets the delay of the fade animation when the CheckBox is going to be closed.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
animationShowDelay()
animationShowDelay($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets the delay of the fade animation when the CheckBox is going to be opened.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
boxSize()
boxSize($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets the checkbox’s size.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
checked()
checked($value = null) : \\Hazaar\\Widgets\\Checkbox

Gets or sets the ckeck state. Possible Values: true, false and null(when the hasThreeStates property value is true).

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
enableContainerClick()
enableContainerClick($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets whether the clicks on the container are handled as clicks on the check box.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
groupName()
groupName($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets the group name. When this property is set, the checkboxes in the same group behave as radio buttons.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
hasThreeStates()
hasThreeStates($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets whether the checkbox has 3 states – checked, unchecked and indeterminate.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
locked()
locked($value) : \\Hazaar\\Widgets\\Checkbox

Gets or sets whether the checkbox is locked. In this mode the user is not allowed to check/uncheck the checkbox.

Parameters

$valueint

No description

Returns

\\Hazaar\\Widgets\\Checkbox
onChange()
onChange($code) : \\Hazaar\\Widgets\\Checkbox

This event is triggered when a checkbox value is changed.

Parameters

$codestring

The code to execute when the event is triggered

Returns

\\Hazaar\\Widgets\\Checkbox
onChecked()
onChecked($code) : \\Hazaar\\Widgets\\Checkbox

This event is triggered when a checkbox is checked.

Parameters

$codestring

The code to execute when the event is triggered

Returns

\\Hazaar\\Widgets\\Checkbox
onIndeterminate()
onIndeterminate($code) : \\Hazaar\\Widgets\\Checkbox

‘Indeterminate’ event is triggered when the checkbox’s ckecked property is going to be null.

Parameters

$codestring

The code to execute when the event is triggered

Returns

\\Hazaar\\Widgets\\Checkbox
onUnchecked()
onUnchecked($code) : \\Hazaar\\Widgets\\Checkbox

This event is triggered when a checkbox is unchecked.

Parameters

$codestring

The code to execute when the event is triggered

Returns

\\Hazaar\\Widgets\\Checkbox
Inherited
method()
method($name) : \Hazaar\View\Widgets\Widget

Call a jqWidgets method using the jqWidgets interface. Methods are called using this interface by specifying the first argument as the method being called and subsequent arguments are the actual arguments for the method call.

Parameters

$namestring

The method to call.

Returns

\Hazaar\View\Widgets\Widget
Inherited
name()
name() : string

Returns the name of the object class. This is used to generate the jqxWidget plugin method name.

Returns

string
Inherited
onClick()
onClick($value) : \Hazaar\View\Widgets\Widget

Adds a click event to a widget

Parameters

$valuemixed

The code as a string or JavaScript object, or array of objects to execute.

Returns

\Hazaar\View\Widgets\Widget
Inherited
render()
render() : string

Execute the render method on a widget

Returns

string

JavaScript code to execute the render method.

Inherited
renderObject()
renderObject() : string

Method to render the widget into HTML.

Returns

string

The widget rendererd as HTML.

Inherited
set()
set($key, $value = null, $type = null) : \Hazaar\View\Widgets\Widget

Sets a parameter that is sent to the DOM object.

This method can be used to set a single parameter, with the $key and $value arguments, or multiple parameters by just using the $key argument which is an array of key/value pairs of parameters that are to be set.

Parameters

$keymixed

The name of the parameter to be set, or an array of key/value pairs listing multiple parameters to be set.

$valuemixed

(Optional) The value of the parameter if only specifying one parameter.

$typestring

(Optional) The data type of the value. If set then this will be set explicitly.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
setContent()
setContent($content) : string

Sets or gets the value.

Parameters

$content

No description

Returns

string
Inherited
style()
style($value)

Parameters

$value

No description

Inherited
theme()
theme($value) : \Hazaar\View\Widgets\Widget

Specifies the theme to use when initialising the widget. This is not normally needed as the default theme is set when creating each widget. However you may want to override the theme on a per widget basis and this allows for that.

Keep in mind that the theme file used will have to included manually.

Parameters

$valuestring

The name of the theme.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
val()
val($value = null) : string

Sets or gets the value.

Parameters

$valuestring

The value to set

Returns

string
Inherited
width()
width($value) : \Hazaar\View\Widgets\Widget

Specifies the width of the widget in pixels.

Parameters

$valuemixed

The width value. Either an integer or string (with px suffix);

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.