本文整理汇总了PHP中CDiv::ToString方法的典型用法代码示例。如果您正苦于以下问题:PHP CDiv::ToString方法的具体用法?PHP CDiv::ToString怎么用?PHP CDiv::ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiv
的用法示例。
在下文中一共展示了CDiv::ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bodyToString
function bodyToString($destroy = true)
{
$left = new CDiv(null, 'left');
$left->addItem(new CDiv($this->getList(), 'left_menu'));
$link1 = new CLink('www.zabbix.com', 'http://www.zabbix.com/', null, null, true);
$link1->setAttribute('target', '_blank');
$link2 = new CLink('GPL v2', 'http://www.zabbix.com/license.php', null, null, true);
$link2->setAttribute('target', '_blank');
$licence = new CDiv(array($link1, BR(), ' Licensed under ', $link2), 'setup_wizard_licence');
$left->addItem($licence);
$right = new CDiv(null, 'right');
if ($this->getStep() == 0) {
$right->addItem(new CDiv(null, 'blank_title'));
$right->addItem(new CDiv($this->getState(), 'blank_under_title'));
$container = new CDiv(array($left, $right), 'setup_wizard setup_wizard_welcome');
} else {
$right->addItem(new CDiv($this->stage[$this->getStep()]['title'], 'setup_title'));
$right->addItem(new CDiv($this->getState(), 'under_title'));
$container = new CDiv(array($left, $right), 'setup_wizard');
}
if (isset($this->stage[$this->getStep() + 1])) {
$next = new CSubmit('next[' . $this->getStep() . ']', _('Next') . SPACE . '»');
} else {
$next = new CSubmit('finish', _('Finish'));
}
if (isset($this->HIDE_CANCEL_BUTTON) && $this->HIDE_CANCEL_BUTTON) {
$cancel = null;
} else {
$cancel = new CDiv(new CSubmit('cancel', _('Cancel')), 'footer_left');
}
if ($this->DISABLE_NEXT_BUTTON) {
$next->setEnabled(false);
}
// if the user is not logged in (first setup run) hide the "previous" button on the final step
if ($this->getStep() && (CWebUser::$data && CWebUser::getType() == USER_TYPE_SUPER_ADMIN || $this->getStep() < 5)) {
$back = new CSubmit('back[' . $this->getStep() . ']', '«' . SPACE . _('Previous'));
} else {
$back = null;
}
$footer = new CDiv(array($cancel, new CDiv(array($back, $next), 'footer_right')), 'footer');
$container->addItem($footer);
return parent::bodyToString($destroy) . $container->ToString();
}
示例2: bodyToString
function bodyToString($destroy = true)
{
$left = new CDiv(null, 'left');
$left->addItem(new CDiv(null, 'setup_logo'));
$left->addItem(new CDiv(ZABBIX_VERSION, 'setup_version'));
$left->addItem(new CDiv($this->getList(), 'left_menu'));
$link1 = new CLink('www.zabbix.com', 'http://www.zabbix.com/', null, null, true);
$link1->setAttribute('target', '_blank');
$link2 = new CLink('GPL v2', 'http://www.zabbix.com/license.php', null, null, true);
$link2->setAttribute('target', '_blank');
$licence = new CDiv(array($link1, BR(), ' Licensed under ', $link2), 'setup_wizard_licence');
$left->addItem($licence);
$right = new CDiv(null, 'right');
if ($this->getStep() == 0) {
$right->addItem(new CDiv(null, 'blank_title'));
$right->addItem(new CDiv($this->getState(), 'blank_under_title'));
$container = new CDiv(array($left, $right), 'setup_wizard setup_wizard_welcome');
} else {
$right->addItem(new CDiv($this->stage[$this->getStep()]['title'], 'setup_title'));
$right->addItem(new CDiv($this->getState(), 'under_title'));
$container = new CDiv(array($left, $right), 'setup_wizard');
}
if (isset($this->stage[$this->getStep() + 1])) {
$next = new CSubmit('next[' . $this->getStep() . ']', _('Next') . ' >>');
} else {
$next = new CSubmit('finish', _('Finish'));
}
if (isset($this->HIDE_CANCEL_BUTTON) && $this->HIDE_CANCEL_BUTTON) {
$cancel = null;
} else {
$cancel = new CDiv(new CSubmit('cancel', _('Cancel')), 'footer_left');
}
if ($this->DISABLE_NEXT_BUTTON) {
$next->setEnabled(false);
}
$footer = new CDiv(array($cancel, new CDiv(array($this->getStep() != 0 ? new CSubmit('back[' . $this->getStep() . ']', '<< ' . _('Previous')) : null, $next), 'footer_right')), 'footer');
$container->addItem($footer);
return parent::bodyToString($destroy) . $container->ToString();
}