PHP Class Prado\Web\UI\WebControls\TCheckBoxList

TCheckBoxList displays a list of checkboxes on a Web page. The layout of the checkbox list is specified via {@link setRepeatLayout RepeatLayout}, which can be either 'Table' (default) or 'Flow'. A table layout uses HTML table cells to organize the checkboxes while a flow layout uses line breaks to organize the checkboxes. When the layout is using 'Table', {@link setCellPadding CellPadding} and {@link setCellSpacing CellSpacing} can be used to adjust the cellpadding and cellpadding of the table. The number of columns used to display the checkboxes is specified via {@link setRepeatColumns RepeatColumns} property, while the {@link setRepeatDirection RepeatDirection} governs the order of the items being rendered. The alignment of the text besides each checkbox can be specified via {@link setTextAlign TextAlign}.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TListControl, implements IRepeatInfoUser, implements Prado\Web\UI\INamingContainer, implements Prado\Web\UI\IPostBackDataHandler, implements Prado\Web\UI\IValidatable
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Constructor.
findControl ( $id, $real = false ) : TControl Finds a control by ID.
generateItemStyle ( $itemType, $index ) : null Returns a style used for rendering items.
getCellPadding ( ) : integer
getCellSpacing ( ) : integer
getDataChanged ( ) : boolean Returns a value indicating whether postback has caused the control data change.
getHasFooter ( ) : boolean Returns a value indicating whether this control contains footer item.
getHasHeader ( ) : boolean Returns a value indicating whether this control contains header item.
getHasSeparators ( ) : boolean Returns a value indicating whether this control contains separator items.
getIsValid ( ) : boolean Returns true if this control validated successfully.
getRepeatColumns ( ) : integer
getRepeatDirection ( ) : string
getRepeatLayout ( ) : string
getTextAlign ( ) : TTextAlign
getValidationPropertyValue ( ) : mixed Returns the value to be validated.
loadPostData ( $key, $values ) : boolean Loads user input data.
onPreRender ( $param ) Registers for post data on postback.
raisePostDataChangedEvent ( ) Raises postdata changed event.
render ( $writer ) Renders the checkbox list control.
renderItem ( $writer, $repeatInfo, $itemType, $index ) Renders an item in the list.
setCellPadding ( $value ) Sets the cellpadding for the table keeping the checkbox list.
setCellSpacing ( $value ) Sets the cellspacing for the table keeping the checkbox list.
setEnabled ( $value )
setIsValid ( $value )
setRepeatColumns ( $value )
setRepeatDirection ( $value )
setRepeatLayout ( $value )
setTextAlign ( $value )

Méthodes protégées

Méthode Description
createRepeatedControl ( ) : TControl Creates a control used for repetition (used as a template).
createStyle ( ) : TStyle Creates a style object for the control.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getIsMultiSelect ( ) : boolean
getPostBackOptions ( ) : array Gets the post back options for this checkbox.
getRepeatInfo ( ) : TRepeatInfo
getSpanNeeded ( ) : boolean Wether the list should be rendered inside a span or not

Method Details

__construct() public méthode

Remember to call parent implementation if you override this method
public __construct ( )

createRepeatedControl() protected méthode

Creates a control used for repetition (used as a template).
protected createRepeatedControl ( ) : TControl
Résultat TControl the control to be repeated

createStyle() protected méthode

This method creates a {@link TTableStyle} to be used by checkbox list.
protected createStyle ( ) : TStyle
Résultat TStyle control style to be used

findControl() public méthode

This method overrides the parent implementation so that it always returns the checkbox list itself (because the checkbox list does not have child controls.)
public findControl ( $id, $real = false ) : TControl
Résultat TControl control being found

generateItemStyle() public méthode

This method is required by {@link IRepeatInfoUser} interface.
public generateItemStyle ( $itemType, $index ) : null
Résultat null

getCellPadding() public méthode

public getCellPadding ( ) : integer
Résultat integer the cellpadding for the table keeping the checkbox list. Defaults to -1, meaning not set.

getCellSpacing() public méthode

public getCellSpacing ( ) : integer
Résultat integer the cellspacing for the table keeping the checkbox list. Defaults to -1, meaning not set.

getClientClassName() protected méthode

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Résultat string the javascript class name

getDataChanged() public méthode

This method is required by the \Prado\Web\UI\IPostBackDataHandler interface.
public getDataChanged ( ) : boolean
Résultat boolean whether postback has caused the control data change. False if the page is not in postback mode.

getHasFooter() public méthode

This method is required by {@link IRepeatInfoUser} interface.
public getHasFooter ( ) : boolean
Résultat boolean always false.

getHasHeader() public méthode

This method is required by {@link IRepeatInfoUser} interface.
public getHasHeader ( ) : boolean
Résultat boolean always false.

getHasSeparators() public méthode

This method is required by {@link IRepeatInfoUser} interface.
public getHasSeparators ( ) : boolean
Résultat boolean always false.

getIsMultiSelect() protected méthode

protected getIsMultiSelect ( ) : boolean
Résultat boolean whether this control supports multiple selection. Always true for checkbox list.

getIsValid() public méthode

Defaults to true.
public getIsValid ( ) : boolean
Résultat boolean wether this control validated successfully.

getPostBackOptions() protected méthode

Gets the post back options for this checkbox.
protected getPostBackOptions ( ) : array
Résultat array

getRepeatColumns() public méthode

public getRepeatColumns ( ) : integer
Résultat integer the number of columns that the list should be displayed with. Defaults to 0 meaning not set.

getRepeatDirection() public méthode

public getRepeatDirection ( ) : string
Résultat string the direction of traversing the list, defaults to 'Vertical'

getRepeatInfo() protected méthode

protected getRepeatInfo ( ) : TRepeatInfo
Résultat TRepeatInfo repeat information (primarily used by control developers)

getRepeatLayout() public méthode

public getRepeatLayout ( ) : string
Résultat string how the list should be displayed, using table or using line breaks. Defaults to 'Table'.

getSpanNeeded() protected méthode

Wether the list should be rendered inside a span or not
protected getSpanNeeded ( ) : boolean
Résultat boolean true if we need a span

getTextAlign() public méthode

public getTextAlign ( ) : TTextAlign
Résultat TTextAlign the alignment of the text caption, defaults to TTextAlign::Right.

getValidationPropertyValue() public méthode

This methid is required by \Prado\Web\UI\IValidatable interface.
public getValidationPropertyValue ( ) : mixed
Résultat mixed the value of the property to be validated.

loadPostData() public méthode

This method is primarly used by framework developers.
public loadPostData ( $key, $values ) : boolean
Résultat boolean whether the data of the control has been changed

onPreRender() public méthode

This method overrides the parent implementation.
public onPreRender ( $param )

raisePostDataChangedEvent() public méthode

This method is required by {@link \Prado\Web\UI\IPostBackDataHandler} interface. It is invoked by the framework when {@link getSelectedIndices SelectedIndices} property is changed on postback. This method is primarly used by framework developers.

render() public méthode

This method overrides the parent implementation.
public render ( $writer )

renderItem() public méthode

This method is required by {@link IRepeatInfoUser} interface.
public renderItem ( $writer, $repeatInfo, $itemType, $index )

setCellPadding() public méthode

Sets the cellpadding for the table keeping the checkbox list.
public setCellPadding ( $value )

setCellSpacing() public méthode

Sets the cellspacing for the table keeping the checkbox list.
public setCellSpacing ( $value )

setEnabled() public méthode

public setEnabled ( $value )

setIsValid() public méthode

public setIsValid ( $value )

setRepeatColumns() public méthode

public setRepeatColumns ( $value )

setRepeatDirection() public méthode

public setRepeatDirection ( $value )

setRepeatLayout() public méthode

public setRepeatLayout ( $value )

setTextAlign() public méthode

public setTextAlign ( $value )