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);
Показать файл
Открыть проект
Примеры использования класса
Метод | Описание | |
---|---|---|
addParsedObject ( $object ) | Adds object parsed from template to the control. | |
getBackImageUrl ( ) : string | ||
getCaption ( ) : string | ||
getCaptionAlign ( ) : |
||
getCellPadding ( ) : integer | ||
getCellSpacing ( ) : integer | ||
getGridLines ( ) : |
||
getHorizontalAlign ( ) : |
||
getRows ( ) : |
||
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 ( ) : |
Creates a control collection object that is to be used to hold child controls | |
createStyle ( ) : |
Creates a style object for the control. | |
getTagName ( ) : string |
protected addAttributesToRender ( $writer ) |
public addParsedObject ( $object ) |
protected createControlCollection ( ) : |
||
Результат | control collection |
protected createStyle ( ) : |
||
Результат | control style to be used |
public getBackImageUrl ( ) : string | ||
Результат | string | the URL of the background image for the table |
public getCaptionAlign ( ) : |
||
Результат | table caption alignment. Defaults to TTableCaptionAlign::NotSet. |
public getCellPadding ( ) : integer | ||
Результат | integer | the cellpadding for the table. Defaults to -1, meaning not set. |
public getCellSpacing ( ) : integer | ||
Результат | integer | the cellspacing for the table. Defaults to -1, meaning not set. |
public getGridLines ( ) : |
||
Результат | the grid line setting of the table. Defaults to TTableGridLines::None. |
public getHorizontalAlign ( ) : |
||
Результат | the horizontal alignment of the table content. Defaults to THorizontalAlign::NotSet. |
public getRows ( ) : |
||
Результат | list of {@link TTableRow} controls |
protected getTagName ( ) : string | ||
Результат | string | tag name for the table |
public renderBeginTag ( $writer ) |
public renderContents ( $writer ) |
public setBackImageUrl ( $value ) |