本文整理匯總了PHP中CDiv::toString方法的典型用法代碼示例。如果您正苦於以下問題:PHP CDiv::toString方法的具體用法?PHP CDiv::toString怎麽用?PHP CDiv::toString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CDiv
的用法示例。
在下文中一共展示了CDiv::toString方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toString
public function toString($destroy = true)
{
$this->addItem($this->formList);
return parent::toString($destroy);
}
示例2: toString
public function toString($destroy = true)
{
if (count($this->tabs) == 1) {
$this->setAttribute('class', 'min-width ui-tabs ui-widget ui-widget-content ui-corner-all widget');
$header = reset($this->headers);
$header = new CDiv($header);
$header->addClass('ui-corner-all ui-widget-header header');
$header->setAttribute('id', 'tab_' . key($this->headers));
$this->addItem($header);
$tab = reset($this->tabs);
$tab->addClass('ui-tabs ui-tabs-panel ui-widget ui-widget-content ui-corner-all widget');
$this->addItem($tab);
} else {
$headersList = new CList();
foreach ($this->headers as $id => $header) {
$tabLink = new CLink($header, '#' . $id, null, null, false);
$tabLink->setAttribute('id', 'tab_' . $id);
$headersList->addItem($tabLink);
}
$this->addItem($headersList);
$this->addItem($this->tabs);
$options = array();
if (!is_null($this->selectedTab)) {
$options['selected'] = $this->selectedTab;
}
if ($this->rememberTab) {
$options['cookie'] = array();
}
zbx_add_post_js('jQuery("#' . $this->id . '").tabs(' . zbx_jsvalue($options, true) . ').show();');
}
return parent::toString($destroy);
}
示例3: toString
public function toString($destroy = true)
{
// No header if we have only one Tab
if (count($this->tabs) == 1) {
$tab = reset($this->tabs);
$this->addItem($tab);
} else {
$headersList = (new CList())->addClass(ZBX_STYLE_TABS_NAV);
foreach ($this->headers as $id => $header) {
$tabLink = (new CLink($header, '#' . $id))->setId('tab_' . $id);
$headersList->addItem($tabLink);
}
$this->addItem($headersList);
$this->addItem($this->tabs);
if ($this->selectedTab === null) {
$activeTab = get_cookie('tab', 0);
$createEvent = '';
} else {
$activeTab = $this->selectedTab;
$createEvent = 'create: function() { jQuery.cookie("tab", ' . $this->selectedTab . '); },';
}
$disabledTabs = $this->disabledTabs === null ? '' : 'disabled: ' . CJs::encodeJson($this->disabledTabs) . ',';
zbx_add_post_js('
jQuery("#' . $this->id . '").tabs({
' . $createEvent . '
' . $disabledTabs . '
active: ' . $activeTab . ',
activate: function(event, ui) {
jQuery.cookie("tab", ui.newTab.index().toString());
}
})
.css("visibility", "visible");');
}
$this->addItem($this->footer);
return parent::toString($destroy);
}
示例4: toString
public function toString($destroy = true)
{
$this->get();
return parent::toString($destroy);
}
示例5: toString
public function toString($destroy = true)
{
if (count($this->tabs) == 1) {
$this->setAttribute('class', 'min-width ui-tabs ui-widget ui-widget-content ui-corner-all widget');
$header = reset($this->headers);
$header = new CDiv($header);
$header->addClass('ui-corner-all ui-widget-header header');
$header->setAttribute('id', 'tab_' . key($this->headers));
$this->addItem($header);
$tab = reset($this->tabs);
$tab->addClass('ui-tabs ui-tabs-panel ui-widget ui-widget-content ui-corner-all widget');
$this->addItem($tab);
} else {
$headersList = new CList();
foreach ($this->headers as $id => $header) {
$tabLink = new CLink($header, '#' . $id, null, null, false);
$tabLink->setAttribute('id', 'tab_' . $id);
$headersList->addItem($tabLink);
}
$this->addItem($headersList);
$this->addItem($this->tabs);
if ($this->selectedTab === null) {
$activeTab = get_cookie('tab', 0);
$createEvent = '';
} else {
$activeTab = $this->selectedTab;
$createEvent = 'create: function() { jQuery.cookie("tab", ' . $this->selectedTab . '); },';
}
$disabledTabs = $this->disabledTabs === null ? '' : 'disabled: ' . CJs::encodeJson($this->disabledTabs) . ',';
zbx_add_post_js('
jQuery("#' . $this->id . '").tabs({
' . $createEvent . '
' . $disabledTabs . '
active: ' . $activeTab . ',
activate: function(event, ui) {
jQuery.cookie("tab", ui.newTab.index().toString());
}
})
.css("visibility", "visible");');
}
return parent::toString($destroy);
}