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
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode 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 méthode

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
Résultat string the static text of the TLiteral

getEncode() public méthode

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

getText() public méthode

public getText ( ) : string
Résultat string the static text of the TLiteral

render() public méthode

Renders the literal control.
public render ( $writer )

setData() public méthode

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 méthode

public setEncode ( $value )

setText() public méthode

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