Method | Description | |
---|---|---|
__get ( $name ) : mixed | Returns a property value by name or a control by ID. | |
__isset ( $name ) : boolean | Checks for the existance of a property value by name or a control by ID. | |
addParsedObject ( $object ) | Adds the object instantiated on a template to the child control collection. | |
addedControl ( $control ) | Adds a control into the child collection of the control. | |
applyStyleSheetSkin ( $page ) | Applies a stylesheet skin to a control. | |
autoBindProperty ( $name, $expression ) | Sets up the binding between a property (or property path) and an expression. | |
bindProperty ( $name, $expression ) | Sets up the binding between a property (or property path) and an expression. | |
broadcastEvent ( $name, $sender, $param ) | Broadcasts an event. | |
bubbleEvent ( $sender, $param ) : boolean | This method responds to a bubbled event. | |
clearNamingContainer ( ) | Resets the control as a naming container. | |
clearViewState ( $key ) | Clears a viewstate value. | |
convertUniqueIdToClientId ( $uniqueID ) : string | Converts a unique ID to a client ID. | |
createChildControls ( ) | Creates child controls. | |
dataBind ( ) | Performs the databinding for this control. | |
ensureChildControls ( ) | Ensures child controls are created. | |
findControl ( $id ) : |
Finds a control by ID path within the current naming container. | |
findControlsByID ( $id ) : array | Finds all child and grand-child controls with the specified ID. | |
findControlsByType ( $type, $strict = true ) : array | Finds all child and grand-child controls that are of the specified type. | |
focus ( ) | Sets input focus to this control. | |
getAdapter ( ) : |
||
getAllowChildControls ( ) : boolean | ||
getAttribute ( $name ) : string | ||
getAttributes ( ) : |
Returns the list of custom attributes. | |
getClientID ( ) : string | Returns the client ID of the control. | |
getControls ( ) : |
||
getCustomData ( ) : mixed | Returns custom data associated with this control. | |
getEnableTheming ( ) : boolean | ||
getEnableViewState ( $checkParents = false ) : boolean | ||
getEnabled ( $checkParents = false ) : boolean | Returns a value indicating whether the control is enabled. | |
getHasAdapter ( ) : boolean | ||
getHasAttributes ( ) : boolean | ||
getHasChildInitialized ( ) : boolean | ||
getHasControls ( ) : boolean | ||
getHasInitialized ( ) : boolean | ||
getHasLoaded ( ) : boolean | ||
getHasLoadedPostData ( ) : boolean | ||
getHasPreRendered ( ) : boolean | ||
getID ( $hideAutoID = true ) : string | Returns the id of the control. | |
getIsSkinApplied ( ) | ||
getNamingContainer ( ) : |
||
getPage ( ) : |
||
getParent ( ) : |
||
getRegisteredObject ( $name ) : mixed | Returns the named registered object. | |
getSkinID ( ) : string | ||
getSourceTemplateControl ( ) : |
||
getTemplateControl ( ) : |
||
getUniqueID ( ) : string | Returns a unique ID that identifies the control in the page hierarchy. | |
getViewState ( $key, $defaultValue = null ) : mixed | Returns a viewstate value. | |
getVisible ( $checkParents = true ) : boolean | Checks if a control is visible. | |
hasAttribute ( $name ) : boolean | ||
isObjectRegistered ( $name ) : boolean | ||
loadState ( ) | This method is invoked right after the control has loaded its state. | |
onDataBinding ( $param ) | Raises 'OnDataBinding' event. | |
onInit ( $param ) | This method is invoked when the control enters 'OnInit' stage. | |
onLoad ( $param ) | This method is invoked when the control enters 'OnLoad' stage. | |
onPreRender ( $param ) | This method is invoked when the control enters 'OnPreRender' stage. | |
onUnload ( $param ) | This method is invoked when the control enters 'OnUnload' stage. | |
registerObject ( $name, $object ) | Registers an object by a name. | |
removeAttribute ( $name ) : string | Removes the named attribute. | |
removedControl ( $control ) | Removes a control from the child collection of the control. | |
render ( $writer ) | Renders the control. | |
renderChildren ( $writer ) | Renders the children of the control. | |
renderControl ( $writer ) | Renders the control. | |
saveState ( ) | This method is invoked when control state is to be saved. | |
setAdapter ( |
||
setAttribute ( $name, $value ) | Sets a custom control attribute. | |
setCustomData ( $value ) | Associates custom data with this control. | |
setEnableTheming ( $value ) | ||
setEnableViewState ( $value ) | ||
setEnabled ( $value ) | ||
setID ( $id ) | ||
setPage ( $page ) | Sets the page for a control. | |
setSkinID ( $value ) | ||
setTemplateControl ( $control ) | Sets the control whose template contains this control. | |
setViewState ( $key, $value, $defaultValue = null ) | Sets a viewstate value. | |
setVisible ( $value ) | ||
trackViewState ( $enabled ) | Sets a value indicating whether we should keep data in viewstate. | |
unbindProperty ( $name ) | Breaks the binding between a property (or property path) and an expression. | |
unregisterObject ( $name ) | Unregisters an object by name. |
Method | Description | |
---|---|---|
autoDataBindProperties ( ) | Auto databinding properties of the control. | |
clearChildState ( ) | Clears up the child state data. | |
clearControlState ( $key ) | Clears a controlstate value. | |
createControlCollection ( ) : |
Creates a control collection object that is to be used to hold child controls | |
dataBindChildren ( ) | Databinding child controls. | |
dataBindProperties ( ) | Databinding properties of the control. | |
getChildControlsCreated ( ) : boolean | ||
getControlStage ( ) : integer | Gets the lifecycle step the control is currently at. | |
getControlState ( $key, $defaultValue = null ) : mixed | Returns a controlstate value. | |
initRecursive ( $namingContainer = null ) | Performs the Init step for the control and all its child controls. | |
isDescendentOf ( $ancestor ) : boolean | ||
loadRecursive ( ) | Performs the Load step for the control and all its child controls. | |
loadStateRecursive ( &$state, $needViewState = true ) | Loads state (viewstate and controlstate) into a control and its children. | |
preRenderRecursive ( ) | Performs the PreRender step for the control and all its child controls. | |
raiseBubbleEvent ( $sender, $param ) | Invokes the parent's bubbleEvent method. | |
saveStateRecursive ( $needViewState = true ) : array | Saves all control state (viewstate and controlstate) as a collection. | |
setChildControlsCreated ( $value ) | Sets a value indicating whether child controls are created. | |
setControlStage ( $value ) | Sets the lifecycle step the control is currently at. | |
setControlState ( $key, $value, $defaultValue = null ) | Sets a controlstate value. | |
traverseChildControls ( $param, $preCallback = null, $postCallback = null ) | Traverse the whole control hierarchy rooted at this control. | |
unloadRecursive ( ) | Performs the Unload step for the control and all its child controls. |
Method | Description | |
---|---|---|
broadcastEventInternal ( $name, $sender, $param ) | Recursively broadcasts an event. | |
clearCachedUniqueID ( $recursive ) | Clears the cached UniqueID. | |
clearNameTable ( ) | Clears the list of the controls whose IDs are managed by the specified naming container. | |
fillNameTable ( $container, $controls ) | Updates the list of the controls whose IDs are managed by the specified naming container. | |
generateAutomaticID ( ) | Generates an automatic ID for the control. |
$menuBar=$this->menuBar;
Note, the control must be configured in the template
with explicit ID. If the name matches both a property and a control ID,
the control ID will take the precedence.
$menuBarExists = isset($this->menuBar);
Do not call this method. This is a PHP magic method that we override
to allow using isset() to detect if a component property is set or not.
Note, the control must be configured in the template
with explicit ID. If the name matches both a property and a control ID,
the control ID will take the precedence. public addParsedObject ( $object ) |
public addedControl ( $control ) |
public applyStyleSheetSkin ( $page ) |
public autoBindProperty ( $name, $expression ) |
protected autoDataBindProperties ( ) |
public bindProperty ( $name, $expression ) |
public broadcastEvent ( $name, $sender, $param ) |
public bubbleEvent ( $sender, $param ) : boolean | ||
return | boolean | true if the event bubbling is handled and no more bubbling. |
final protected clearChildState ( ) |
protected clearControlState ( $key ) |
public clearNamingContainer ( ) |
public static convertUniqueIdToClientId ( $uniqueID ) : string | ||
return | string | the client ID of the control |
public createChildControls ( ) |
protected createControlCollection ( ) : |
||
return | control collection |
protected dataBindProperties ( ) |
public ensureChildControls ( ) |
public findControl ( $id ) : |
||
return | the control found, null if not found |
public findControlsByID ( $id ) : array | ||
return | array | list of controls found |
public findControlsByType ( $type, $strict = true ) : array | ||
return | array | list of controls found |
public getAdapter ( ) : |
||
return | control adapter. Null if not exists. |
public getAllowChildControls ( ) : boolean | ||
return | boolean | whether body contents are allowed for this control. Defaults to true. |
public getAttribute ( $name ) : string | ||
return | string | attribute value, null if attribute does not exist |
public getAttributes ( ) : |
||
return | the list of custom attributes |
final protected getChildControlsCreated ( ) : boolean | ||
return | boolean | whether child controls have been created |
public getClientID ( ) : string | ||
return | string | the client ID of the control |
protected getControlStage ( ) : integer | ||
return | integer | the lifecycle step the control is currently at. The value can be CS_CONSTRUCTED, CS_CHILD_INITIALIZED, CS_INITIALIZED, CS_STATE_LOADED, CS_LOADED, CS_PRERENDERED. |
protected getControlState ( $key, $defaultValue = null ) : mixed | ||
return | mixed | the controlstate value corresponding to $key |
public getControls ( ) : |
||
return | the child control collection |
public getCustomData ( ) : mixed | ||
return | mixed | custom data associated with this control. Defaults to null. |
public getEnableTheming ( ) : boolean | ||
return | boolean | whether theming is enabled for this control. The theming is enabled if the control and all its parents have it enabled. |
public getEnableViewState ( $checkParents = false ) : boolean | ||
return | boolean | whether viewstate is enabled |
public getEnabled ( $checkParents = false ) : boolean | ||
return | boolean | whether the control is enabled. |
public getHasAdapter ( ) : boolean | ||
return | boolean | whether there is an adapter for this control |
public getHasAttributes ( ) : boolean | ||
return | boolean | whether the control has custom attributes |
public getHasChildInitialized ( ) : boolean | ||
return | boolean | true if the child control has been initialized. |
public getHasControls ( ) : boolean | ||
return | boolean | whether the control has child controls |
public getHasInitialized ( ) : boolean | ||
return | boolean | true if the onInit event has raised. |
public getHasLoaded ( ) : boolean | ||
return | boolean | true if the onLoad event has raised. |
public getHasLoadedPostData ( ) : boolean | ||
return | boolean | true if the control has loaded post data. |
public getHasPreRendered ( ) : boolean | ||
return | boolean | true if onPreRender event has raised. |
public getNamingContainer ( ) : |
||
return | the naming container of this control |
public getParent ( ) : |
||
return | the parent of this control |
public getRegisteredObject ( $name ) : mixed | ||
return | mixed | the named registered object. Null if object is not found. |
public getSourceTemplateControl ( ) : |
||
return | the control whose template is loaded from some external storage, such as file, db, and whose template ultimately contains this control. |
public getTemplateControl ( ) : |
||
return | the control whose template contains this control |
public getUniqueID ( ) : string | ||
return | string | a unique ID that identifies the control in the page hierarchy |
public getViewState ( $key, $defaultValue = null ) : mixed | ||
return | mixed | the viewstate value corresponding to $key |
public getVisible ( $checkParents = true ) : boolean | ||
return | boolean | whether the control is visible (default=true). |
public hasAttribute ( $name ) : boolean | ||
return | boolean | whether the named attribute exists |
protected initRecursive ( $namingContainer = null ) |
final protected isDescendentOf ( $ancestor ) : boolean | ||
return | boolean | if the control is a descendent (parent, parent of parent, etc.) of the specified control |
public isObjectRegistered ( $name ) : boolean | ||
return | boolean | whether an object has been registered with the name |
protected loadRecursive ( ) |
public loadState ( ) |
protected loadStateRecursive ( &$state, $needViewState = true ) |
public onDataBinding ( $param ) |
public onInit ( $param ) |
public onLoad ( $param ) |
public onPreRender ( $param ) |
public onUnload ( $param ) |
protected preRenderRecursive ( ) |
protected raiseBubbleEvent ( $sender, $param ) |
public registerObject ( $name, $object ) |
public removeAttribute ( $name ) : string | ||
return | string | attribute value removed, null if attribute does not exist. |
public removedControl ( $control ) |
public render ( $writer ) |
public renderChildren ( $writer ) |
public renderControl ( $writer ) |
public saveState ( ) |
protected saveStateRecursive ( $needViewState = true ) : array | ||
return | array | the collection of the control state (including its children's state). |
final protected setChildControlsCreated ( $value ) |
protected setControlStage ( $value ) |
protected setControlState ( $key, $value, $defaultValue = null ) |
public setCustomData ( $value ) |
public setTemplateControl ( $control ) |
public setViewState ( $key, $value, $defaultValue = null ) |
public trackViewState ( $enabled ) |
function callback_func($control,$param) {...}
where $control refers to the control being visited and $param
is the parameter that is passed originally when calling this traverse function. protected traverseChildControls ( $param, $preCallback = null, $postCallback = null ) |
public unbindProperty ( $name ) |
protected unloadRecursive ( ) |