SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatOptionControl
└─SwatCheckboxList
public class SwatCheckboxList
extends SwatOptionControl
| Field Summary | |
|---|---|
| integer or array of integers | Defines the columns in which this list is displayed. |
| boolean | Whether to show the check all box. |
| array | List values. |
| Fields inherited from Swat.SwatOptionControl | |
|---|---|
| options, serialize_values | |
| Fields inherited from Swat.SwatInputControl | |
|---|---|
| required | |
| Constructor Summary | |
|---|---|
SwatCheckboxList(string id) Creates a new checkbox list. |
|
| Method Summary | |
|---|---|
| protected void | Creates and adds composite widgets of this widget. |
| void | display() Displays this checkbox list. |
| protected void | displayOption(SwatOption option, integer index) Helper method to display a single option of this checkbox list. |
| protected array | Gets the array of CSS classes that are applied to this checkbox list. |
| protected string | Gets the inline JavaScript for this checkbox list. |
| protected void | getLiTag(mixed option) |
| array | getState() Gets the current state of this checkbox list. |
| void | init() Initializes this checkbox list. |
| void | process() Processes this checkbox list widget. |
| protected void | Processes the values of this checkbox list from raw form data. |
| void | reset() Reset this checkbox list. |
| void | setState(array state) Sets the current state of this checkbox list. |
| Methods inherited from Swat.SwatOptionControl | |
|---|---|
| addOption, addOptionsByArray, getOption, getOptions, getOptionsByValue, removeOption, removeOptionsByValue | |
| Methods inherited from Swat.SwatInputControl | |
|---|---|
| getForm, init | |
| Methods inherited from Swat.SwatControl | |
|---|---|
| addMessage, getNote, printWidgetTree | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public integer or array of integers $columns = 1
Defines the columns in which this list is displayed
If unspecified, the list will be displayed in one column.
Each column is displayed using a separate XHTML unordered list
(<ul>). If the value is an integer it specifies
the number of columns to display. If the value is an array of
integers it specifies the number of checkboxes to display in each
column.
public boolean $show_check_all = true
Whether to show the check all box
public array $values = array()
List values
The values of the selected items.
public SwatCheckboxList(string id)
Creates a new checkbox list
id - a non-visible unique id for this widget.protected void createCompositeWidgets()
Creates and adds composite widgets of this widget
Created composite widgets should be added in this method using
SwatWidget::addCompositeWidget().
public void display()
Displays this checkbox list
The check-all widget is only displayed if more than one checkable item is displayed.
protected void displayOption(SwatOption option, integer index)
Helper method to display a single option of this checkbox list
option - the option to display.index - a numeric index indicating which option is being displayed.protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this checkbox list
protected string getInlineJavaScript()
Gets the inline JavaScript for this checkbox list
protected void getLiTag(mixed option)
public array getState()
Gets the current state of this checkbox list
public void init()
Initializes this checkbox list
public void process()
Processes this checkbox list widget
protected void processValues()
Processes the values of this checkbox list from raw form data
public void reset()
Reset this checkbox list.
Reset the list to its default state. This is useful to call from a display() method when persistence is not desired.
public void setState(array state)
Sets the current state of this checkbox list
state - the new state of this checkbox list.
A checkbox list widget