本文整理匯總了PHP中CFormList::addItem方法的典型用法代碼示例。如果您正苦於以下問題:PHP CFormList::addItem方法的具體用法?PHP CFormList::addItem怎麽用?PHP CFormList::addItem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CFormList
的用法示例。
在下文中一共展示了CFormList::addItem方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach (array(TRIGGER_VALUE_FALSE, TRIGGER_VALUE_TRUE) as $trigerValue) {
$condition->addItem($trigerValue, trigger_value2str($trigerValue));
}
break;
case CONDITION_TYPE_TIME_PERIOD:
$condition = new CTextBox('new_condition[value]', ZBX_DEFAULT_INTERVAL, ZBX_TEXTBOX_STANDARD_SIZE);
break;
case CONDITION_TYPE_TRIGGER_SEVERITY:
$condition = new CComboBox('new_condition[value]');
$condition->addItems(getSeverityCaption());
break;
case CONDITION_TYPE_MAINTENANCE:
$condition = new CCol(_('maintenance'));
break;
case CONDITION_TYPE_NODE:
$conditionFormList->addItem(new CVar('new_condition[value]', '0'));
$condition = array(new CTextBox('node', '', ZBX_TEXTBOX_STANDARD_SIZE, 'yes'), SPACE, new CButton('btn1', _('Select'), 'return PopUp("popup.php?srctbl=nodes&srcfld1=nodeid&srcfld2=name' . '&dstfrm=' . $actionForm->getName() . '&dstfld1=new_condition_value&dstfld2=node' . '&writeonly=1", 450, 450);', 'link_menu'));
break;
case CONDITION_TYPE_DRULE:
$conditionFormList->addItem(new CVar('new_condition[value]', '0'));
$condition = array(new CTextBox('drule', '', ZBX_TEXTBOX_STANDARD_SIZE, 'yes'), SPACE, new CButton('btn1', _('Select'), 'return PopUp("popup.php?srctbl=drules&srcfld1=druleid&srcfld2=name' . '&dstfrm=' . $actionForm->getName() . '&dstfld1=new_condition_value&dstfld2=drule", 450, 450);', 'link_menu'));
break;
case CONDITION_TYPE_DCHECK:
$conditionFormList->addItem(new CVar('new_condition[value]', '0'));
$condition = array(new CTextBox('dcheck', '', ZBX_TEXTBOX_STANDARD_SIZE, 'yes'), SPACE, new CButton('btn1', _('Select'), 'return PopUp("popup.php?srctbl=dchecks&srcfld1=dcheckid&srcfld2=name' . '&dstfrm=' . $actionForm->getName() . '&dstfld1=new_condition_value&dstfld2=dcheck&writeonly=1", 450, 450);', 'link_menu'));
break;
case CONDITION_TYPE_PROXY:
$conditionFormList->addItem(new CVar('new_condition[value]', '0'));
$condition = array(new CTextBox('proxy', '', ZBX_TEXTBOX_STANDARD_SIZE, 'yes'), SPACE, new CButton('btn1', _('Select'), 'return PopUp("popup.php?srctbl=proxies&srcfld1=hostid&srcfld2=host' . '&dstfrm=' . $actionForm->getName() . '&dstfld1=new_condition_value&dstfld2=proxy' . '", 450, 450);', 'link_menu'));
break;
case CONDITION_TYPE_DHOST_IP: