PHP Class Prado\Web\UI\WebControls\TLiteral

TLiteral displays a static text on the Web page. TLiteral is similar to the TLabel control, except that the TLiteral control does not have style properties (e.g. BackColor, Font, etc.) You can programmatically control the text displayed in the control by setting the {@link setText Text} property. The text displayed may be HTML-encoded if the {@link setEncode Encode} property is set true (defaults to false). TLiteral will render the contents enclosed within its component tag if {@link setText Text} is empty. Note, if {@link setEncode Encode} is false, make sure {@link setText Text} does not contain unwanted characters that may bring security vulnerabilities.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\Web\UI\TControl, implements Prado\IDataRenderer
Mostra file Open project: pradosoft/prado

Public Methods

Method Description
getData ( ) : string Returns the static text of the TLiteral.
getEncode ( ) : boolean
getText ( ) : string
render ( $writer ) Renders the literal control.
setData ( $value ) Sets the static text of the TLiteral.
setEncode ( $value )
setText ( $value ) Sets the static text of the TLiteral

Method Details

getData() public method

This method is required by {@link \Prado\IDataRenderer}. It is the same as {@link getText()}.
See also: getText
Since: 3.1.0
public getData ( ) : string
return string the static text of the TLiteral

getEncode() public method

public getEncode ( ) : boolean
return boolean whether the rendered text should be HTML-encoded. Defaults to false.

getText() public method

public getText ( ) : string
return string the static text of the TLiteral

render() public method

Renders the literal control.
public render ( $writer )

setData() public method

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

setEncode() public method

public setEncode ( $value )

setText() public method

Sets the static text of the TLiteral
public setText ( $value )