PHP Класс 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}.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TListControl, implements IRepeatInfoUser, implements Prado\Web\UI\INamingContainer, implements Prado\Web\UI\IPostBackDataHandler, implements Prado\Web\UI\IValidatable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 )

Защищенные методы

Метод Описание
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

Описание методов

__construct() публичный метод

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

createRepeatedControl() защищенный метод

Creates a control used for repetition (used as a template).
protected createRepeatedControl ( ) : TControl
Результат TControl the control to be repeated

createStyle() защищенный метод

This method creates a {@link TTableStyle} to be used by checkbox list.
protected createStyle ( ) : TStyle
Результат TStyle control style to be used

findControl() публичный метод

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
Результат TControl control being found

generateItemStyle() публичный метод

This method is required by {@link IRepeatInfoUser} interface.
public generateItemStyle ( $itemType, $index ) : null
Результат null

getCellPadding() публичный метод

public getCellPadding ( ) : integer
Результат integer the cellpadding for the table keeping the checkbox list. Defaults to -1, meaning not set.

getCellSpacing() публичный метод

public getCellSpacing ( ) : integer
Результат integer the cellspacing for the table keeping the checkbox list. Defaults to -1, meaning not set.

getClientClassName() защищенный метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getDataChanged() публичный метод

This method is required by the \Prado\Web\UI\IPostBackDataHandler interface.
public getDataChanged ( ) : boolean
Результат boolean whether postback has caused the control data change. False if the page is not in postback mode.

getHasFooter() публичный метод

This method is required by {@link IRepeatInfoUser} interface.
public getHasFooter ( ) : boolean
Результат boolean always false.

getHasHeader() публичный метод

This method is required by {@link IRepeatInfoUser} interface.
public getHasHeader ( ) : boolean
Результат boolean always false.

getHasSeparators() публичный метод

This method is required by {@link IRepeatInfoUser} interface.
public getHasSeparators ( ) : boolean
Результат boolean always false.

getIsMultiSelect() защищенный метод

protected getIsMultiSelect ( ) : boolean
Результат boolean whether this control supports multiple selection. Always true for checkbox list.

getIsValid() публичный метод

Defaults to true.
public getIsValid ( ) : boolean
Результат boolean wether this control validated successfully.

getPostBackOptions() защищенный метод

Gets the post back options for this checkbox.
protected getPostBackOptions ( ) : array
Результат array

getRepeatColumns() публичный метод

public getRepeatColumns ( ) : integer
Результат integer the number of columns that the list should be displayed with. Defaults to 0 meaning not set.

getRepeatDirection() публичный метод

public getRepeatDirection ( ) : string
Результат string the direction of traversing the list, defaults to 'Vertical'

getRepeatInfo() защищенный метод

protected getRepeatInfo ( ) : TRepeatInfo
Результат TRepeatInfo repeat information (primarily used by control developers)

getRepeatLayout() публичный метод

public getRepeatLayout ( ) : string
Результат string how the list should be displayed, using table or using line breaks. Defaults to 'Table'.

getSpanNeeded() защищенный метод

Wether the list should be rendered inside a span or not
protected getSpanNeeded ( ) : boolean
Результат boolean true if we need a span

getTextAlign() публичный метод

public getTextAlign ( ) : TTextAlign
Результат TTextAlign the alignment of the text caption, defaults to TTextAlign::Right.

getValidationPropertyValue() публичный метод

This methid is required by \Prado\Web\UI\IValidatable interface.
public getValidationPropertyValue ( ) : mixed
Результат mixed the value of the property to be validated.

loadPostData() публичный метод

This method is primarly used by framework developers.
public loadPostData ( $key, $values ) : boolean
Результат boolean whether the data of the control has been changed

onPreRender() публичный метод

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

raisePostDataChangedEvent() публичный метод

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() публичный метод

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

renderItem() публичный метод

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

setCellPadding() публичный метод

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

setCellSpacing() публичный метод

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

setEnabled() публичный метод

public setEnabled ( $value )

setIsValid() публичный метод

public setIsValid ( $value )

setRepeatColumns() публичный метод

public setRepeatColumns ( $value )

setRepeatDirection() публичный метод

public setRepeatDirection ( $value )

setRepeatLayout() публичный метод

public setRepeatLayout ( $value )

setTextAlign() публичный метод

public setTextAlign ( $value )