PHP Class Prado\Web\UI\WebControls\THiddenField

THiddenField displays a hidden input field on a Web page. The value of the input field can be accessed via {@link getValue Value} property. If upon postback the value is changed, a {@link onValueChanged OnValueChanged} event will be raised.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\Web\UI\TControl, implements Prado\Web\UI\IPostBackDataHandler, implements Prado\Web\UI\IValidatable, implements Prado\IDataRenderer
Mostrar archivo Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
focus ( ) Sets focus to this control.
getData ( ) : string Returns the value of the hidden field.
getDataChanged ( ) : boolean Returns a value indicating whether postback has caused the control data change.
getEnableTheming ( ) : boolean
getIsValid ( ) : boolean Returns true if this control validated successfully.
getValidationPropertyValue ( ) : mixed Returns the value to be validated.
getValue ( ) : string
loadPostData ( $key, $values ) : boolean Loads hidden field data.
onValueChanged ( $param ) This method is invoked when the value of the {@link getValue Value} property changes between posts to the server.
raisePostDataChangedEvent ( ) Raises postdata changed event.
render ( $writer ) Renders the control.
setData ( $value ) Sets the value of the hidden field.
setEnableTheming ( $value )
setIsValid ( $value )
setSkinID ( $value )
setValue ( $value ) Sets the value of the THiddenField

Protected Methods

Method Description
getTagName ( ) : string

Method Details

focus() public method

This method overrides the parent implementation by forbidding setting focus to this control.
public focus ( )

getData() public method

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link getValue()}.
See also: getValue
Since: 3.1.0
public getData ( ) : string
return string value of the hidden field

getDataChanged() public method

This method is required by the \Prado\Web\UI\IPostBackDataHandler interface.
public getDataChanged ( ) : boolean
return boolean whether postback has caused the control data change. False if the page is not in postback mode.

getEnableTheming() public method

public getEnableTheming ( ) : boolean
return boolean whether theming is enabled for this control. Defaults to false.

getIsValid() public method

Defaults to true.
public getIsValid ( ) : boolean
return boolean wether this control validated successfully.

getTagName() protected method

protected getTagName ( ) : string
return string tag name of the hidden field.

getValidationPropertyValue() public method

This methid is required by \Prado\Web\UI\IValidatable interface.
public getValidationPropertyValue ( ) : mixed
return mixed the value of the property to be validated.

getValue() public method

public getValue ( ) : string
return string the value of the THiddenField

loadPostData() public method

This method is primarly used by framework developers.
public loadPostData ( $key, $values ) : boolean
return boolean whether the data of the component has been changed

onValueChanged() public method

The method raises 'OnValueChanged' event to fire up the event delegates. If you override this method, be sure to call the parent implementation so that the attached event handlers can be invoked.
public onValueChanged ( $param )

raisePostDataChangedEvent() public method

This method calls {@link onValueChanged} method. This method is primarly used by framework developers.

render() public method

This method overrides the parent implementation by rendering the hidden field input element.
public render ( $writer )

setData() public method

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link setValue()}.
See also: setValue
Since: 3.1.0
public setData ( $value )

setEnableTheming() public method

public setEnableTheming ( $value )

setIsValid() public method

public setIsValid ( $value )

setSkinID() public method

public setSkinID ( $value )

setValue() public method

Sets the value of the THiddenField
public setValue ( $value )