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


PHP CDiv::additem方法代碼示例

本文整理匯總了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);
開發者ID:phedders,項目名稱:zabbix,代碼行數:31,代碼來源:page_header.php


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