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
Показать файл Открыть проект

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

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