PHP Class Prado\Web\UI\WebControls\TTableCell

TTableCell displays a table cell on a Web page. Content of the table cell is specified by the {@link setText Text} property. If {@link setText Text} is empty, the body contents enclosed by the table cell component tag are rendered. Note, {@link setText Text} is not HTML-encoded when displayed. So make sure it does not contain dangerous characters. The horizontal and vertical alignments of the contents in the cell are specified via {@link setHorizontalAlign HorizontalAlign} and {@link setVerticalAlign VerticalAlign} properties, respectively. The colspan and rowspan of the cell are specified via {@link setColumnSpan ColumnSpan} and {@link setRowSpan RowSpan} properties. And the {@link setWrap Wrap} property indicates whether the contents in the cell should be wrapped.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TWebControl, implements Prado\IDataRenderer
Show file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
getColumnSpan ( ) : integer
getData ( ) : string Returns the text content of the table cell.
getHorizontalAlign ( ) : string
getRowSpan ( ) : integer
getText ( ) : string
getVerticalAlign ( ) : string
getWrap ( ) : boolean
renderContents ( $writer ) Renders body contents of the table cell.
setColumnSpan ( $value ) Sets the columnspan for the table cell.
setData ( $value ) Sets the text content of the table cell.
setHorizontalAlign ( $value ) Sets the horizontal alignment of the contents within the table item.
setRowSpan ( $value ) Sets the rowspan for the table cell.
setText ( $value ) Sets the text content of the table cell.
setVerticalAlign ( $value ) Sets the vertical alignment of the contents within the table item.
setWrap ( $value ) Sets the value indicating whether the text content wraps within a table cell.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Adds attributes to renderer.
createStyle ( ) : TStyle Creates a style object for the control.
getTagName ( ) : string

Method Details

addAttributesToRender() protected method

Adds attributes to renderer.
protected addAttributesToRender ( $writer )

createStyle() protected method

This method creates a {@link TTableItemStyle} to be used by the table cell.
protected createStyle ( ) : TStyle
return TStyle control style to be used

getColumnSpan() public method

public getColumnSpan ( ) : integer
return integer the columnspan for the table cell, 0 if not set.

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 text content of the table cell.

getHorizontalAlign() public method

public getHorizontalAlign ( ) : string
return string the horizontal alignment of the contents within the table item, defaults to 'NotSet'.

getRowSpan() public method

public getRowSpan ( ) : integer
return integer the rowspan for the table cell, 0 if not set.

getTagName() protected method

protected getTagName ( ) : string
return string tag name for the table cell

getText() public method

public getText ( ) : string
return string the text content of the table cell.

getVerticalAlign() public method

public getVerticalAlign ( ) : string
return string the vertical alignment of the contents within the table item, defaults to 'NotSet'.

getWrap() public method

public getWrap ( ) : boolean
return boolean whether the text content wraps within a table cell. Defaults to true.

renderContents() public method

Renders body contents of the table cell.
public renderContents ( $writer )

setColumnSpan() public method

Sets the columnspan for the table cell.
public setColumnSpan ( $value )

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 )

setHorizontalAlign() public method

Valid values include 'NotSet', 'Justify', 'Left', 'Right', 'Center'
public setHorizontalAlign ( $value )

setRowSpan() public method

Sets the rowspan for the table cell.
public setRowSpan ( $value )

setText() public method

If the text content is empty, body content (child controls) of the cell will be rendered.
public setText ( $value )

setVerticalAlign() public method

Valid values include 'NotSet','Top','Bottom','Middle'
public setVerticalAlign ( $value )

setWrap() public method

Sets the value indicating whether the text content wraps within a table cell.
public setWrap ( $value )