當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CTable::toString方法代碼示例

本文整理匯總了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;
 }
開發者ID:jbfavre,項目名稱:debian-zabbix,代碼行數:13,代碼來源:CTableInfo.php

示例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;
    }
開發者ID:omidmt,項目名稱:zabbix-greenplum,代碼行數:41,代碼來源:CTableInfo.php

示例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();
 }
開發者ID:SandipSingh14,項目名稱:Zabbix_,代碼行數:27,代碼來源:class.cformtable.php

示例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();
 }
開發者ID:rennhak,項目名稱:zabbix,代碼行數:30,代碼來源:class.cformtable.php


注:本文中的CTable::toString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。