PHP Класс Prado\Web\UI\WebControls\TTable

TTable displays an HTML table on a Web page. A table may have {@link setCaption Caption}, whose alignment is specified via {@link setCaptionAlign CaptionAlign}. The table cellpadding and cellspacing are specified via {@link setCellPadding CellPadding} and {@link setCellSpacing CellSpacing} properties, respectively. The {@link setGridLines GridLines} specifies how the table should display its borders. The horizontal alignment of the table content can be specified via {@link setHorizontalAlign HorizontalAlign}, and {@link setBackImageUrl BackImageUrl} can assign a background image to the table. A TTable maintains a list of {@link TTableRow} controls in its {@link getRows Rows} property. Each {@link TTableRow} represents an HTML table row. To populate the table {@link getRows Rows}, you may either use control template or dynamically create {@link TTableRow} in code. In template, do as follows to create the table rows and cells, The above can also be accomplished in code as follows, $table=new TTable; $row=new TTableRow; $cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell); $cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell); $table->Rows->add($row); $row=new TTableRow; $cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell); $cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell); $table->Rows->add($row);
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TWebControl
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addParsedObject ( $object ) Adds object parsed from template to the control.
getBackImageUrl ( ) : string
getCaption ( ) : string
getCaptionAlign ( ) : TTableCaptionAlign
getCellPadding ( ) : integer
getCellSpacing ( ) : integer
getGridLines ( ) : TTableGridLines
getHorizontalAlign ( ) : THorizontalAlign
getRows ( ) : TTableRowCollection
renderBeginTag ( $writer ) Renders the openning tag for the table control which will render table caption if present.
renderContents ( $writer ) Renders body contents of the table.
setBackImageUrl ( $value ) Sets the URL of the background image for the table
setCaption ( $value )
setCaptionAlign ( $value )
setCellPadding ( $value )
setCellSpacing ( $value )
setGridLines ( $value )
setHorizontalAlign ( $value )

Защищенные методы

Метод Описание
addAttributesToRender ( $writer ) Adds attributes to renderer.
createControlCollection ( ) : TTableRowCollection Creates a control collection object that is to be used to hold child controls
createStyle ( ) : TTableStyle Creates a style object for the control.
getTagName ( ) : string

Описание методов

addAttributesToRender() защищенный Метод

Adds attributes to renderer.
protected addAttributesToRender ( $writer )

addParsedObject() публичный Метод

This method adds only {@link TTableRow} objects into the {@link getRows Rows} collection. All other objects are ignored.
public addParsedObject ( $object )

createControlCollection() защищенный Метод

Creates a control collection object that is to be used to hold child controls
См. также: getControls
protected createControlCollection ( ) : TTableRowCollection
Результат TTableRowCollection control collection

createStyle() защищенный Метод

This method creates a {@link TTableStyle} to be used by the table.
protected createStyle ( ) : TTableStyle
Результат TTableStyle control style to be used

getBackImageUrl() публичный Метод

public getBackImageUrl ( ) : string
Результат string the URL of the background image for the table

getCaption() публичный Метод

public getCaption ( ) : string
Результат string table caption

getCaptionAlign() публичный Метод

public getCaptionAlign ( ) : TTableCaptionAlign
Результат TTableCaptionAlign table caption alignment. Defaults to TTableCaptionAlign::NotSet.

getCellPadding() публичный Метод

public getCellPadding ( ) : integer
Результат integer the cellpadding for the table. Defaults to -1, meaning not set.

getCellSpacing() публичный Метод

public getCellSpacing ( ) : integer
Результат integer the cellspacing for the table. Defaults to -1, meaning not set.

getGridLines() публичный Метод

public getGridLines ( ) : TTableGridLines
Результат TTableGridLines the grid line setting of the table. Defaults to TTableGridLines::None.

getHorizontalAlign() публичный Метод

public getHorizontalAlign ( ) : THorizontalAlign
Результат THorizontalAlign the horizontal alignment of the table content. Defaults to THorizontalAlign::NotSet.

getRows() публичный Метод

public getRows ( ) : TTableRowCollection
Результат TTableRowCollection list of {@link TTableRow} controls

getTagName() защищенный Метод

protected getTagName ( ) : string
Результат string tag name for the table

renderBeginTag() публичный Метод

Renders the openning tag for the table control which will render table caption if present.
public renderBeginTag ( $writer )

renderContents() публичный Метод

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

setBackImageUrl() публичный Метод

Sets the URL of the background image for the table
public setBackImageUrl ( $value )

setCaption() публичный Метод

public setCaption ( $value )

setCaptionAlign() публичный Метод

public setCaptionAlign ( $value )

setCellPadding() публичный Метод

public setCellPadding ( $value )

setCellSpacing() публичный Метод

public setCellSpacing ( $value )

setGridLines() публичный Метод

public setGridLines ( $value )

setHorizontalAlign() публичный Метод

public setHorizontalAlign ( $value )