本文整理汇总了PHP中CDiv::additem方法的典型用法代码示例。如果您正苦于以下问题:PHP CDiv::additem方法的具体用法?PHP CDiv::additem怎么用?PHP CDiv::additem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDiv
的用法示例。
在下文中一共展示了CDiv::additem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$node_tree[0] = array('id' => 0, 'caption' => S_ALL_S, 'combo_select_node' => $combo_check_all, 'parentid' => 0);
//root
foreach ($available_nodes as $num => $node) {
$checked = uint_in_array($node['nodeid'], $ZBX_VIEWED_NODES['nodeids']);
$combo_select_node = new CCheckbox('selected_nodes[' . $node['nodeid'] . ']', $checked, null, $node['nodeid']);
// If not exist parent for node, link it to root (0)
if (!isset($available_nodes[$node['masterid']])) {
$node['masterid'] = 0;
}
$node_tree[$node['nodeid']] = array('id' => $node['nodeid'], 'caption' => $node['name'], 'combo_select_node' => $combo_select_node, 'parentid' => $node['masterid']);
}
$node_tree_captions = array('caption' => bold(S_NODE), 'combo_select_node' => SPACE);
$node_tree = new CTree('nodes', $node_tree, $node_tree_captions);
// --- ---
$div_node_tree = new CDiv();
$div_node_tree->additem($node_tree->getHTML());
$div_node_tree->additem(new CButton('select_nodes', S_SELECT, "javascript: " . " hidePopupDiv('select_iframe');" . " \$('div_node_tree').setStyle({display:'none'});"));
$div_node_tree->setAttribute('id', 'div_node_tree');
$div_node_tree->addStyle('display: none');
if (!is_null($combo_node_list)) {
$node_form->addItem(array(new CSpan(S_CURRENT_NODE, 'textcolorstyles'), $combo_node_list));
}
$node_form->addItem($button_show_tree);
$node_form->addItem($div_node_tree);
unset($combo_node_list);
}
}
// 1st level menu
$table = new CTable();
$table->setCellSpacing(0);
$table->setCellPadding(0);