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
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
__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 )