PHP 클래스 Prado\Web\UI\WebControls\TValidationSummary

TValidationSummary displays a summary of validation errors inline on a Web page, in a message box, or both. By default, a validation summary will collect {@link TBaseValidator::getErrorMessage ErrorMessage} of all failed validators on the page. If {@link getValidationGroup ValidationGroup} is not empty, only those validators who belong to the group will show their error messages in the summary. The summary can be displayed as a list, as a bulleted list, or as a single paragraph based on the {@link setDisplayMode DisplayMode} property. The messages shown can be prefixed with {@link setHeaderText HeaderText}. The summary can be displayed on the Web page and in a message box by setting the {@link setShowSummary ShowSummary} and {@link setShowMessageBox ShowMessageBox} properties, respectively. Note, the latter is only effective when {@link setEnableClientScript EnableClientScript} is true.
부터: 3.0
저자: Qiang Xue ([email protected])
상속: extends TWebControl
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
__construct ( ) Constructor.
getAutoUpdate ( ) : boolean Gets the auto-update for this summary.
getClientSide ( ) : TClientSideValidationSummaryOptions
getDisplay ( ) : TValidationSummaryDisplayStyle
getDisplayMode ( ) : TValidationSummaryDisplayMode
getEnableClientScript ( ) : boolean
getHeaderText ( ) : string
getScrollToSummary ( ) : boolean
getShowAnchor ( ) : boolean
getShowMessageBox ( ) : boolean
getShowSummary ( ) : boolean
getValidationGroup ( ) : string
renderContents ( $writer ) : string Overrides parent implementation by rendering TValidationSummary-specific presentation.
setAutoUpdate ( $value ) Sets the summary to auto-update on the client-side
setDisplay ( $value )
setDisplayMode ( $value )
setEnableClientScript ( $value )
setHeaderText ( $value ) Sets the header text to be displayed at the top of the summary
setScrollToSummary ( $value )
setShowAnchor ( $value )
setShowMessageBox ( $value )
setShowSummary ( $value )
setValidationGroup ( $value )

보호된 메소드들

메소드 설명
addAttributesToRender ( $writer )
createClientScript ( ) : TClientSideValidationSummaryOptions
getClientScriptOptions ( ) : array Get a list of options for the client-side javascript validation summary.
getErrorMessages ( ) : array Get the list of validation error messages.
renderBulletList ( $writer ) : string Render the validation summary as a bullet list.
renderHeaderOnly ( $writer ) Render the validation summary header text only.
renderJsSummary ( ) Render the javascript for validation summary.
renderList ( $writer ) : string Render the validation summary as a simple list.
renderSingleParagraph ( $writer ) : string Render the validation summary as a paragraph.

메소드 상세

__construct() 공개 메소드

This method sets the foreground color to red.
public __construct ( )

addAttributesToRender() 보호된 메소드

protected addAttributesToRender ( $writer )

createClientScript() 보호된 메소드

protected createClientScript ( ) : TClientSideValidationSummaryOptions
리턴 TClientSideValidationSummaryOptions javascript validation summary event options.

getAutoUpdate() 공개 메소드

Gets the auto-update for this summary.
public getAutoUpdate ( ) : boolean
리턴 boolean automatic client-side summary updates. Defaults to true.

getClientScriptOptions() 보호된 메소드

Get a list of options for the client-side javascript validation summary.
protected getClientScriptOptions ( ) : array
리턴 array list of options for the summary

getClientSide() 공개 메소드

public getClientSide ( ) : TClientSideValidationSummaryOptions
리턴 TClientSideValidationSummaryOptions client-side validation summary event options.

getDisplay() 공개 메소드

public getDisplay ( ) : TValidationSummaryDisplayStyle
리턴 TValidationSummaryDisplayStyle the style of displaying the error messages. Defaults to TValidationSummaryDisplayStyle::Fixed.

getDisplayMode() 공개 메소드

public getDisplayMode ( ) : TValidationSummaryDisplayMode
리턴 TValidationSummaryDisplayMode the mode of displaying error messages. Defaults to TValidationSummaryDisplayMode::BulletList.

getEnableClientScript() 공개 메소드

public getEnableClientScript ( ) : boolean
리턴 boolean whether the TValidationSummary component updates itself using client-side script. Defaults to true.

getErrorMessages() 보호된 메소드

Get the list of validation error messages.
protected getErrorMessages ( ) : array
리턴 array list of validator error messages.

getHeaderText() 공개 메소드

public getHeaderText ( ) : string
리턴 string the header text displayed at the top of the summary

getScrollToSummary() 공개 메소드

public getScrollToSummary ( ) : boolean
리턴 boolean whether scroll summary into viewport or not. Defaults to true.

getShowAnchor() 공개 메소드

public getShowAnchor ( ) : boolean
리턴 boolean whether the validation summary should be anchored. Defaults to false.

getShowMessageBox() 공개 메소드

public getShowMessageBox ( ) : boolean
리턴 boolean whether the validation summary is displayed in a message box. Defaults to false.

getShowSummary() 공개 메소드

public getShowSummary ( ) : boolean
리턴 boolean whether the validation summary is displayed inline. Defaults to true.

getValidationGroup() 공개 메소드

public getValidationGroup ( ) : string
리턴 string the group which this validator belongs to

renderBulletList() 보호된 메소드

Render the validation summary as a bullet list.
protected renderBulletList ( $writer ) : string
리턴 string summary bullet list

renderContents() 공개 메소드

Overrides parent implementation by rendering TValidationSummary-specific presentation.
public renderContents ( $writer ) : string
리턴 string the rendering result

renderHeaderOnly() 보호된 메소드

Render the validation summary header text only.
protected renderHeaderOnly ( $writer )

renderJsSummary() 보호된 메소드

Render the javascript for validation summary.
protected renderJsSummary ( )

renderList() 보호된 메소드

Render the validation summary as a simple list.
protected renderList ( $writer ) : string
리턴 string summary list

renderSingleParagraph() 보호된 메소드

Render the validation summary as a paragraph.
protected renderSingleParagraph ( $writer ) : string
리턴 string summary paragraph

setAutoUpdate() 공개 메소드

Sets the summary to auto-update on the client-side
public setAutoUpdate ( $value )

setDisplay() 공개 메소드

public setDisplay ( $value )

setDisplayMode() 공개 메소드

public setDisplayMode ( $value )

setEnableClientScript() 공개 메소드

public setEnableClientScript ( $value )

setHeaderText() 공개 메소드

Sets the header text to be displayed at the top of the summary
public setHeaderText ( $value )

setScrollToSummary() 공개 메소드

public setScrollToSummary ( $value )

setShowAnchor() 공개 메소드

public setShowAnchor ( $value )

setShowMessageBox() 공개 메소드

public setShowMessageBox ( $value )

setShowSummary() 공개 메소드

public setShowSummary ( $value )

setValidationGroup() 공개 메소드

public setValidationGroup ( $value )