Class \Prado\Web\UI\WebControls\TLabel
TLabel displays a piece of text on a Web page. Use \Prado\Web\UI\WebControls\setText property to set the text to be displayed. TLabel will render the contents enclosed within its component tag if \Prado\Web\UI\WebControls\setText is empty. To use TLabel as a form label, associate it with a control by setting the \Prado\Web\UI\WebControls\setForControl property. The associated control must be locatable within the label's naming container. If the associated control is not visible, the label will not be rendered, either.
Note, \Prado\Web\UI\WebControls\setText will NOT be encoded for rendering. Make sure it does not contain dangerous characters that you want to avoid.
Class hierarchy
- \Prado\Web\UI\WebControls\TLabel implements IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
getData() : string
Returns the text value of the label.
This method is required by IDataRenderer. It is the same as getText(). |
public
|
|
public
|
|
public
|
render(THtmlWriter $writer) : mixed
Renders the label.
It overrides the parent implementation by checking if an associated control is visible or not. If not, the label will not be rendered. |
public
|
|
public
|
setData(string $value) : mixed
Sets the text value of the label.
This method is required by IDataRenderer. It is the same as setText(). |
public
|
setForControl(string $value) : mixed
Sets the ID of the control that the label is associated with.
The control must be locatable via TControl::findControl using the ID. |
public
|
|
protected
|
|
protected
|