PHP Класс Prado\Web\UI\TPage

С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TTemplateControl
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_controlsPostDataChanged list of controls whose data have been changed due to the postback
$_controlsRegisteredForPostData list of controls that need to load post data in the next postback
$_controlsRequiringPostData list of controls that need to load post data in the current request
$_formRendered whether the form has been rendered
$_inFormRender whether the current rendering is within a form
$_isLoadingPostData true if loading post data.
$_postData data post back by user
$_restPostData postback data that is not handled during first invocation of LoadPostData.

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

Метод Описание
__construct ( ) Constructor.
applyControlSkin ( $control ) Applies a skin in the current theme to a control.
applyControlStyleSheet ( $control ) Applies a stylesheet skin in the current theme to a control.
beginFormRender ( $writer )
endFormRender ( $writer )
ensureRenderInForm ( $control ) Ensures the control is rendered within a form.
flushWriter ( ) Flushes output
getCachingStack ( ) : TStack
getCallbackClient ( ) : TCallbackClientScript Gets the callback client script handler that allows javascript functions to be executed during the callback response.
getCallbackEventParameter ( ) : string Callback parameter is decoded assuming JSON encoding.
getCallbackEventTarget ( ) : TControl
getClientScript ( ) : TClientScriptManager
getClientState ( ) : string Returns the state to be stored on the client side.
getClientSupportsJavaScript ( ) : boolean
getEnableStateCompression ( ) : boolean
getEnableStateEncryption ( ) : boolean
getEnableStateValidation ( ) : boolean
getForm ( ) : TForm
getHead ( ) : THead
getInFormRender ( ) : boolean
getIsCallback ( ) : boolean
getIsLoadingPostData ( ) : boolean
getIsPostBack ( ) : boolean
getIsValid ( ) : boolean Returns whether user input is valid or not.
getPagePath ( ) : string
getPostBackEventParameter ( ) : string
getPostBackEventTarget ( ) : TControl
getRequestClientState ( ) : string
getStatePersister ( ) : Prado\Web\UI\IPageStatePersister
getStatePersisterClass ( ) : string
getStyleSheetTheme ( ) : TTheme
getTheme ( ) : TTheme
getTitle ( ) : string
getValidators ( $validationGroup = null ) : Prado\Collections\TList Returns a list of registered validators.
loadState ( ) This method is invoked right after the control has loaded its state.
onInitComplete ( $param ) Raises OnInitComplete event.
onLoadComplete ( $param ) Raises OnLoadComplete event.
onPreInit ( $param ) Raises OnPreInit event.
onPreLoad ( $param ) Raises OnPreLoad event.
onPreRenderComplete ( $param ) Raises OnPreRenderComplete event.
onSaveStateComplete ( $param ) Raises OnSaveStateComplete event.
registerCachingAction ( $context, $funcName, $funcParams ) Registers an action associated with the content being cached.
registerRequiresPostData ( $control ) Registers a control for loading post data in the next postback.
run ( $writer ) Runs through the page lifecycles.
saveState ( ) This method is invoked when control state is to be saved.
setCallbackClient ( $client ) Set a new callback client handler.
setCallbackEventParameter ( $value )
setCallbackEventTarget ( TControl $control ) Registers a control to raise callback event in the current request.
setClientState ( $state ) Sets the state to be stored on the client side.
setClientSupportsJavaScript ( $value )
setEnableStateCompression ( $value )
setEnableStateEncryption ( $value )
setEnableStateValidation ( $value )
setFocus ( $value ) Sets input focus on a control after the page is rendered to users.
setForm ( TForm $form ) Registers a TForm instance to the page.
setHead ( THead $value )
setPagePath ( $value )
setPostBackEventParameter ( $value )
setPostBackEventTarget ( TControl $control ) Registers a control to raise postback event in the current request.
setStatePersisterClass ( $value )
setStyleSheetTheme ( $value ) Sets the stylesheet theme to be used for the page.
setTheme ( $value ) Sets the theme to be used for the page.
setTitle ( $value ) Sets the page title.
validate ( $validationGroup = null ) Performs input validation.

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

Метод Описание
decodeUTF8 ( $data, $enc )
isSystemPostField ( $field ) : boolean
loadPageState ( ) Loads page state from persistent storage.
processCallbackRequest ( $writer ) Sets Adapter to TActivePageAdapter and calls apter to process the callback request.
processNormalRequest ( $writer )
processPostBackRequest ( $writer )
processPostData ( $postData, $beforeLoad ) Processes post data.
raiseChangedEvents ( ) Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.
raisePostBackEvent ( ) Raises PostBack event.
savePageState ( ) Saves page state from persistent storage.

Приватные методы

Метод Описание
determinePostBackMode ( ) Determines whether the current page request is a postback.
getCssMediaType ( $url ) : string Determines the media type of the CSS file.

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

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

Sets the page object to itself. Derived classes must call parent implementation.
public __construct ( )

applyControlSkin() публичный Метод

This method should only be used by framework developers.
public applyControlSkin ( $control )

applyControlStyleSheet() публичный Метод

This method should only be used by framework developers.
public applyControlStyleSheet ( $control )

beginFormRender() публичный Метод

public beginFormRender ( $writer )

decodeUTF8() защищенный статический Метод

protected static decodeUTF8 ( $data, $enc )

endFormRender() публичный Метод

public endFormRender ( $writer )

ensureRenderInForm() публичный Метод

Ensures the control is rendered within a form.
public ensureRenderInForm ( $control )

flushWriter() публичный Метод

Flushes output
public flushWriter ( )

getCachingStack() публичный Метод

public getCachingStack ( ) : TStack
Результат Prado\Collections\TStack stack of {@link TOutputCache} objects

getCallbackClient() публичный Метод

Gets the callback client script handler that allows javascript functions to be executed during the callback response.
public getCallbackClient ( ) : TCallbackClientScript
Результат Prado\Web\UI\ActiveControls\TCallbackClientScript interface to client-side javascript code.

getCallbackEventParameter() публичный Метод

Callback parameter is decoded assuming JSON encoding.
public getCallbackEventParameter ( ) : string
Результат string callback event parameter

getCallbackEventTarget() публичный Метод

public getCallbackEventTarget ( ) : TControl
Результат TControl the control responsible for the current callback event, null if nonexistent

getClientScript() публичный Метод

public getClientScript ( ) : TClientScriptManager
Результат TClientScriptManager client script manager

getClientState() публичный Метод

This method should only be used by framework and control developers.
public getClientState ( ) : string
Результат string the state to be stored on the client side

getClientSupportsJavaScript() публичный Метод

public getClientSupportsJavaScript ( ) : boolean
Результат boolean whether client supports javascript. Defaults to true.

getEnableStateCompression() публичный Метод

С версии: 3.1.6
public getEnableStateCompression ( ) : boolean
Результат boolean whether page state should be compressed. Defaults to true.

getEnableStateEncryption() публичный Метод

public getEnableStateEncryption ( ) : boolean
Результат boolean whether page state should be encrypted. Defaults to false.

getEnableStateValidation() публичный Метод

public getEnableStateValidation ( ) : boolean
Результат boolean whether page state should be HMAC validated. Defaults to true.

getForm() публичный Метод

public getForm ( ) : TForm
Результат TForm the form on the page

getHead() публичный Метод

public getHead ( ) : THead
Результат Prado\Web\UI\WebControls\THead page head, null if not available

getInFormRender() публичный Метод

public getInFormRender ( ) : boolean
Результат boolean Whether form rendering is in progress

getIsCallback() публичный Метод

public getIsCallback ( ) : boolean
Результат boolean whether this is a callback request

getIsLoadingPostData() публичный Метод

public getIsLoadingPostData ( ) : boolean
Результат boolean true if loading post data.

getIsPostBack() публичный Метод

public getIsPostBack ( ) : boolean
Результат boolean whether the current page request is a postback

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

This method must be invoked after {@link validate} is called.
public getIsValid ( ) : boolean
Результат boolean whether the user input is valid or not.

getPagePath() публичный Метод

public getPagePath ( ) : string
Результат string the requested page path for this page

getPostBackEventParameter() публичный Метод

public getPostBackEventParameter ( ) : string
Результат string postback event parameter

getPostBackEventTarget() публичный Метод

public getPostBackEventTarget ( ) : TControl
Результат TControl the control responsible for the current postback event, null if nonexistent

getRequestClientState() публичный Метод

public getRequestClientState ( ) : string
Результат string the state postback from client side

getStatePersister() публичный Метод

public getStatePersister ( ) : Prado\Web\UI\IPageStatePersister
Результат Prado\Web\UI\IPageStatePersister page state persister

getStatePersisterClass() публичный Метод

public getStatePersisterClass ( ) : string
Результат string class name of the page state persister. Defaults to TPageStatePersister.

getStyleSheetTheme() публичный Метод

public getStyleSheetTheme ( ) : TTheme
Результат TTheme the stylesheet theme used for the page. Defaults to null.

getTheme() публичный Метод

public getTheme ( ) : TTheme
Результат TTheme the theme used for the page. Defaults to null.

getTitle() публичный Метод

public getTitle ( ) : string
Результат string page title.

getValidators() публичный Метод

If validation group is specified, only the validators in that group will be returned.
public getValidators ( $validationGroup = null ) : Prado\Collections\TList
Результат Prado\Collections\TList registered validators in the requested group. If the group is null, all validators will be returned.

isSystemPostField() защищенный Метод

protected isSystemPostField ( $field ) : boolean
Результат boolean whether the specified field is a system field in postback data

loadPageState() защищенный Метод

Loads page state from persistent storage.
protected loadPageState ( )

loadState() публичный Метод

You can override this method to initialize data from the control state. Parent implementation must be invoked.
public loadState ( )

onInitComplete() публичный Метод

This method is invoked right after {@link onInit OnInit} stage and before {@link onLoad OnLoad} stage. You may override this method to provide additional initialization that should be done after {@link onInit OnInit}. Remember to call the parent implementation to ensure OnInitComplete event is raised.
public onInitComplete ( $param )

onLoadComplete() публичный Метод

This method is invoked right after {@link onLoad OnLoad} stage. You may override this method to provide additional page loading logic that should be done after {@link onLoad OnLoad}. Remember to call the parent implementation to ensure OnLoadComplete event is raised.
public onLoadComplete ( $param )

onPreInit() публичный Метод

This method is invoked right before {@link onInit OnInit} stage. You may override this method to provide additional initialization that should be done before {@link onInit OnInit} (e.g. setting {@link setTheme Theme} or {@link setStyleSheetTheme StyleSheetTheme}). Remember to call the parent implementation to ensure OnPreInit event is raised.
public onPreInit ( $param )

onPreLoad() публичный Метод

This method is invoked right before {@link onLoad OnLoad} stage. You may override this method to provide additional page loading logic that should be done before {@link onLoad OnLoad}. Remember to call the parent implementation to ensure OnPreLoad event is raised.
public onPreLoad ( $param )

onPreRenderComplete() публичный Метод

This method is invoked right after {@link onPreRender OnPreRender} stage. You may override this method to provide additional preparation for page rendering that should be done after {@link onPreRender OnPreRender}. Remember to call the parent implementation to ensure OnPreRenderComplete event is raised.
public onPreRenderComplete ( $param )

onSaveStateComplete() публичный Метод

This method is invoked right after {@link onSaveState OnSaveState} stage. You may override this method to provide additional logic after page state is saved. Remember to call the parent implementation to ensure OnSaveStateComplete event is raised.
public onSaveStateComplete ( $param )

processCallbackRequest() защищенный Метод

Sets Adapter to TActivePageAdapter and calls apter to process the callback request.
protected processCallbackRequest ( $writer )

processNormalRequest() защищенный Метод

protected processNormalRequest ( $writer )

processPostBackRequest() защищенный Метод

protected processPostBackRequest ( $writer )

processPostData() защищенный Метод

Processes post data.
protected processPostData ( $postData, $beforeLoad )

raiseChangedEvents() защищенный Метод

Raises OnPostDataChangedEvent for controls whose data have been changed due to the postback.
protected raiseChangedEvents ( )

raisePostBackEvent() защищенный Метод

Raises PostBack event.
protected raisePostBackEvent ( )

registerCachingAction() публичный Метод

The registered action will be replayed if the content stored in the cache is served to end-users.
public registerCachingAction ( $context, $funcName, $funcParams )

registerRequiresPostData() публичный Метод

This method needs to be invoked if the control to load post data may not have a post variable in some cases. For example, a checkbox, if not checked, will not have a post value.
public registerRequiresPostData ( $control )

run() публичный Метод

Runs through the page lifecycles.
public run ( $writer )

savePageState() защищенный Метод

Saves page state from persistent storage.
protected savePageState ( )

saveState() публичный Метод

You can override this method to do last step state saving. Parent implementation must be invoked.
public saveState ( )

setCallbackClient() публичный Метод

Set a new callback client handler.
public setCallbackClient ( $client )

setCallbackEventParameter() публичный Метод

public setCallbackEventParameter ( $value )

setCallbackEventTarget() публичный Метод

Registers a control to raise callback event in the current request.
public setCallbackEventTarget ( TControl $control )
$control TControl

setClientState() публичный Метод

This method should only be used by framework and control developers.
public setClientState ( $state )

setClientSupportsJavaScript() публичный Метод

public setClientSupportsJavaScript ( $value )

setEnableStateCompression() публичный Метод

С версии: 3.1.6
public setEnableStateCompression ( $value )

setEnableStateEncryption() публичный Метод

public setEnableStateEncryption ( $value )

setEnableStateValidation() публичный Метод

public setEnableStateValidation ( $value )

setFocus() публичный Метод

Sets input focus on a control after the page is rendered to users.
public setFocus ( $value )

setForm() публичный Метод

Note, a page can contain at most one TForm instance.
public setForm ( TForm $form )
$form TForm

setHead() публичный Метод

public setHead ( THead $value )
$value Prado\Web\UI\WebControls\THead

setPagePath() публичный Метод

public setPagePath ( $value )

setPostBackEventParameter() публичный Метод

public setPostBackEventParameter ( $value )

setPostBackEventTarget() публичный Метод

Registers a control to raise postback event in the current request.
public setPostBackEventTarget ( TControl $control )
$control TControl

setStatePersisterClass() публичный Метод

public setStatePersisterClass ( $value )

setStyleSheetTheme() публичный Метод

Sets the stylesheet theme to be used for the page.
public setStyleSheetTheme ( $value )

setTheme() публичный Метод

Sets the theme to be used for the page.
public setTheme ( $value )

setTitle() публичный Метод

Note, a {@link THead} control needs to place on the page in order that this title be rendered.
public setTitle ( $value )

validate() публичный Метод

This method will invoke the registered validators to perform the actual validation. If validation group is specified, only the validators in that group will be invoked.
public validate ( $validationGroup = null )

Описание свойств

$_controlsPostDataChanged защищенное свойство

list of controls whose data have been changed due to the postback
protected $_controlsPostDataChanged

$_controlsRegisteredForPostData защищенное свойство

list of controls that need to load post data in the next postback
protected $_controlsRegisteredForPostData

$_controlsRequiringPostData защищенное свойство

list of controls that need to load post data in the current request
protected $_controlsRequiringPostData

$_formRendered защищенное свойство

whether the form has been rendered
protected $_formRendered

$_inFormRender защищенное свойство

whether the current rendering is within a form
protected $_inFormRender

$_isLoadingPostData защищенное свойство

true if loading post data.
protected $_isLoadingPostData

$_postData защищенное свойство

data post back by user
protected $_postData

$_restPostData защищенное свойство

postback data that is not handled during first invocation of LoadPostData.
protected $_restPostData