Class QHtmlTableCheckBoxColumn
A column of checkboxes.
Prints checkboxes in a column, including the header. Override this class and implement whatever hooks you need. In particular implement the CheckId hooks, and IsChecked hooks.
To get the checkbox values to post values back to PHP, each checkbox must have an id of the form:
QcontrolId_index
This class does not detect and record changes in the checkbox list. You can detect changes from within ParsePostData by calling $this->objForm->CheckableControlValue, or use the QHtmlTableCheckBoxColumn_ClickEvent to detect a change to a checkbox.
You will need to detect whether the header check all box was clicked, or a regular box was clicked and respond accordingly. In response to a click, you could store the array of ids of the checkboxes clicked in a session variable, the database, or a cache variable. You would just give an id to each checkbox. This would cause internet traffic every time a box is clicked.
- QBaseClass
- QAbstractHtmlTableColumn
- QAbstractHtmlTableDataColumn
- QHtmlTableCheckBoxColumn
Direct known subclasses
QDataGrid_CheckBoxColumn
public
string
|
#
FetchHeaderCellValue( )
Returns a header cell with a checkbox. This could be used as a check all box. Override this and return an empty string to turn it off. |
public
|
#
FetchCellObject( mixed $item )
Return the value of the cell. FetchCellValue will process this more if needed. Default returns an entire data row and relies on FetchCellValue to extract the needed data. |
public
array
|
#
GetCheckboxParams( mixed|null $item )
Returns an array of parameters to attach to the checkbox tag. Includes whether the checkbox should appear as checked. Will try the callback first, and if not present, will try overridden functions. |
public
|
#
SetCheckParamCallback( $callable )
Optional callback to control the appearance of the checkboxes. You can use a callback, or subclass to do this. If a callback, it should be of the form: func($item) |
protected
|
#
GetCheckboxId( mixed|null $item )
Returns the id for the checkbox itself. This is used together with the check action to send the item id to the action. Your id should look like: |
protected
boolean
|
|
protected
null|string
|
#
GetCheckboxName( mixed|null $item )
Return the name attribute for the checkbox. If you return null, the checkbox will not get submitted to the form. If you return a name, then that will be the key for the value submitted by the form. If you return a name ending with brackets [], then this checkbox will be part of an array of values posted to that name. |
protected
string
|
#
GetCheckboxValue( mixed|null $item )
Return the value attribute of the checkbox tag. Checkboxes are required to have a value in html. This value will be what is posted by form post. |
public
|
|
public
|
|
public
boolean|integer|mixed|
|
|
public
mixed|
|
FetchCellValue()
|
OverrideAttributes(),
__call()
|
protected
boolean
|
$blnHtmlEntities
|
#
false
|
protected
|
$checkParamCallback
|
#
null
|
protected
boolean
|
$blnShowCheckAll
|
#
false
|
$objOrderByClause,
$objPostCallback,
$objReverseOrderByClause,
$strFormat,
$strPostMethod
|
$blnRenderAsHeader,
$blnVisible,
$cellParamsCallback,
$intSpan,
$objCellStyler,
$objColStyler,
$objHeaderCellStyler,
$objParentTable,
$strCssClass,
$strHeaderCssClass,
$strId,
$strName
|
public
boolean
|
$ShowCheckAll
|
$Format,
$OrderByClause,
$PostCallback,
$PostMethod,
$ReverseOrderByClause
|
$CellParamsCallback,
$CellStyler,
$ColStyler,
$CssClass,
$HeaderCellStyler,
$HeaderCssClass,
$HtmlEntities,
$Id,
$Name,
$ParentTable,
$RenderAsHeader,
$Span,
$Visible,
$_ParentTable
|