本文整理汇总了PHP中CTable::addClass方法的典型用法代码示例。如果您正苦于以下问题:PHP CTable::addClass方法的具体用法?PHP CTable::addClass怎么用?PHP CTable::addClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTable
的用法示例。
在下文中一共展示了CTable::addClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createHeader
private function createHeader()
{
$header = reset($this->headers);
$columnRights = array();
if (!is_null($header['right'])) {
foreach ($header['right'] as $right) {
$columnRights[] = new CDiv($right, 'floatright');
}
}
if ($columnRights) {
$columnRights = array_reverse($columnRights);
}
// header table
$table = new CTable(null, $this->css_class . ' maxwidth');
$table->setCellSpacing(0);
$table->setCellPadding(1);
$table->addRow($this->createHeaderRow($header['left'], $columnRights), 'first');
if ($this->css_class != 'header_wide') {
$table->addClass('ui-widget-header ui-corner-all');
}
foreach ($this->headers as $num => $header) {
if ($num > 0) {
$table->addRow($this->createHeaderRow($header['left'], $header['right']), 'next');
}
}
return new CDiv($table);
}
示例2: createHeader
private function createHeader()
{
$header = reset($this->headers);
$columnRights = array();
if (!is_null($header['right'])) {
foreach ($header['right'] as $right) {
$columnRights[] = new CDiv($right, 'floatright');
}
}
if (!is_null($this->state)) {
$icon = new CIcon(_('Show') . '/' . _('Hide'), $this->state ? 'arrowup' : 'arrowdown', "change_hat_state(this, '" . $this->bodyId . "');");
$icon->setAttribute('id', $this->bodyId . '_icon');
$columnRights[] = $icon;
}
if ($columnRights) {
$columnRights = array_reverse($columnRights);
}
// header table
$table = new CTable(null, $this->css_class . ' maxwidth');
$table->setCellSpacing(0);
$table->setCellPadding(1);
$table->addRow($this->createHeaderRow($header['left'], $columnRights), 'first');
if ($this->css_class != 'header_wide') {
$table->addClass('ui-widget-header ui-corner-all');
}
foreach ($this->headers as $num => $header) {
if ($num > 0) {
$table->addRow($this->createHeaderRow($header['left'], $header['right']), 'next');
}
}
return new CDiv($table);
}
示例3: foreach
if ($interfaceTableHeaderSet) {
$jmxInterfacesTable->addClass('element-row');
} else {
$jmxInterfacesTable->addClass('element-row-first');
$jmxInterfacesTable->setHeader(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
}
foreach ($jmxInterfaceRows as $interface) {
$jmxInterfacesTable->addRow($interface);
}
$overviewFormList->addRow(_('JMX interfaces'), new CDiv($jmxInterfacesTable));
}
// IPMI interface
if ($ipmiInterfaceRows) {
$ipmiInterfacesTable = new CTable(null, 'formElementTable border_dotted objectgroup interfaces');
if ($interfaceTableHeaderSet) {
$ipmiInterfacesTable->addClass('element-row');
} else {
$ipmiInterfacesTable->addClass('element-row-first');
$ipmiInterfacesTable->setHeader(array(_('IP address'), _('DNS name'), _('Connect to'), _('Port')));
$interfaceTableHeaderSet = true;
}
foreach ($ipmiInterfaceRows as $interface) {
$ipmiInterfacesTable->addRow($interface);
}
$overviewFormList->addRow(_('IPMI interfaces'), new CDiv($ipmiInterfacesTable));
}
// inventory (OS, Hardware, Software)
if ($this->data['host']['inventory']) {
if ($this->data['host']['inventory']['os']) {
$overviewFormList->addRow($this->data['tableTitles']['os']['title'], new CSpan(zbx_str2links($this->data['host']['inventory']['os']), 'text-field'));
}
示例4: CTable
$histortTab = new CTable(null, 'formElementTable');
$histortTab->addRow(array(new CLabel(_('Enable internal housekeeping'), 'hk_history_mode'), new CCheckBox('hk_history_mode', $this->data['config']['hk_history_mode'], null, 1)));
$houseKeeperHistoryGlobal = new CCheckBox('hk_history_global', $this->data['config']['hk_history_global'], null, 1);
$houseKeeperHistoryModeGlobal = new CNumericBox('hk_history', $this->data['config']['hk_history'], 5);
if (!$this->data['config']['hk_history_global']) {
$houseKeeperHistoryModeGlobal->setAttribute('disabled', 'disabled');
}
$histortTab->addRow(array(new CLabel(_('Override item history period'), 'hk_history_global'), $houseKeeperHistoryGlobal));
$histortTab->addRow(array(new CLabel(_('Data storage period (in days)'), 'hk_history'), $houseKeeperHistoryModeGlobal));
$histortTab->addClass('border_dotted objectgroup element-row');
$houseKeeperTab->addRow(_('History'), new CDiv($histortTab));
// trend
$trendTab = new CTable(null, 'formElementTable');
$trendTab->addRow(array(new CLabel(_('Enable internal housekeeping'), 'hk_trends_mode'), new CCheckBox('hk_trends_mode', $this->data['config']['hk_trends_mode'], null, 1)));
$houseKeeperTrendGlobal = new CCheckBox('hk_trends_global', $this->data['config']['hk_trends_global'], null, 1);
$houseKeeperTrendModeGlobal = new CNumericBox('hk_trends', $this->data['config']['hk_trends'], 5);
if (!$this->data['config']['hk_trends_global']) {
$houseKeeperTrendModeGlobal->setAttribute('disabled', 'disabled');
}
$trendTab->addRow(array(new CLabel(_('Override item trend period'), 'hk_trends_global'), $houseKeeperTrendGlobal));
$trendTab->addRow(array(new CLabel(_('Data storage period (in days)'), 'hk_trends'), $houseKeeperTrendModeGlobal));
$trendTab->addClass('border_dotted objectgroup element-row');
$houseKeeperTab->addRow(_('Trends'), new CDiv($trendTab));
$houseKeeperView = new CTabView();
$houseKeeperView->addTab('houseKeeper', _('Housekeeping'), $houseKeeperTab);
$houseKeeperForm = new CForm();
$houseKeeperForm->setName('houseKeeperForm');
$houseKeeperForm->addVar('form_refresh', $this->data['form_refresh'] + 1);
$houseKeeperForm->addItem($houseKeeperView);
$houseKeeperForm->addItem(makeFormFooter(new CSubmit('save', _('Save')), new CButton('resetDefaults', _('Reset defaults'))));
return $houseKeeperForm;