本文整理汇总了PHP中CTable::toString方法的典型用法代码示例。如果您正苦于以下问题:PHP CTable::toString方法的具体用法?PHP CTable::toString怎么用?PHP CTable::toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTable
的用法示例。
在下文中一共展示了CTable::toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toString
public function toString($destroy = true)
{
$tableId = $this->getId();
if (!$tableId) {
$tableId = uniqid('t');
$this->setId($tableId);
}
$string = parent::toString($destroy);
if ($this->addMakeVerticalRotationJs) {
$string .= get_js('var makeVerticalRotationForTable = function() {' . "\n" . ' jQuery("#' . $tableId . '").makeVerticalRotation();' . "\n" . '}' . "\n" . "\n" . 'if (!jQuery.isReady) {' . "\n" . ' jQuery(document).ready(makeVerticalRotationForTable);' . "\n" . '}' . "\n" . 'else {' . "\n" . ' makeVerticalRotationForTable();' . "\n" . '}', true);
}
return $string;
}
示例2: toString
public function toString($destroy = true)
{
$tableId = $this->getAttribute('id');
if (!$tableId) {
$tableId = uniqid('t');
$this->setAttribute('id', $tableId);
}
$string = parent::toString($destroy);
if ($this->addMakeVerticalRotationJs) {
$string .= get_js('var makeVerticalRotationForTable = function() {
var table = jQuery("#' . $tableId . '");
table.makeVerticalRotation();
if (IE8) {
jQuery(".vertical_rotation_inner", table).css({
filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"
});
}
else if (IE9) {
jQuery(".vertical_rotation_inner", table).css({
"-ms-transform": "rotate(270deg)"
});
}
if (!IE9) {
jQuery(".vertical_rotation_inner", table).css({
"writing-mode": "tb-rl"
});
}
}
if(!jQuery.isReady) {
jQuery(document).ready(makeVerticalRotationForTable);
}
else {
makeVerticalRotationForTable();
}', true);
}
return $string;
}
示例3: bodyToString
public function bodyToString()
{
$res = parent::bodyToString();
$tbl = new CTable(null, $this->tableclass);
$tbl->setCellSpacing(0);
$tbl->setCellPadding(1);
$tbl->setAlign($this->align);
// add first row
if (!is_null($this->title)) {
$col = new CCol(null, 'form_row_first');
$col->setColSpan(2);
if (isset($this->help)) {
$col->addItem($this->help);
}
if (isset($this->title)) {
$col->addItem($this->title);
}
$tbl->setHeader($col);
}
// add last row
$tbl->setFooter($this->bottom_items);
// add center rows
foreach ($this->center_items as $item) {
$tbl->addRow($item);
}
return $res . $tbl->toString();
}
示例4: bodyToString
public function bodyToString()
{
parent::bodyToString();
$tbl = new CTable(NULL, $this->tableclass);
$tbl->setOddRowClass('form_odd_row');
$tbl->setEvenRowClass('form_even_row');
$tbl->setCellSpacing(0);
$tbl->setCellPadding(1);
$tbl->setAlign($this->align);
// add first row
$col = new CCol(NULL, 'form_row_first');
$col->setColSpan(2);
if (isset($this->help)) {
$col->addItem($this->help);
}
if (isset($this->title)) {
$col->addItem($this->title);
}
foreach ($this->top_items as $item) {
$col->addItem($item);
}
$tbl->setHeader($col);
// add last row
$tbl->setFooter($this->bottom_items);
// add center rows
foreach ($this->center_items as $item) {
$tbl->addRow($item);
}
return $tbl->toString();
}