本文整理汇总了PHP中CComboBox::setId方法的典型用法代码示例。如果您正苦于以下问题:PHP CComboBox::setId方法的具体用法?PHP CComboBox::setId怎么用?PHP CComboBox::setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComboBox
的用法示例。
在下文中一共展示了CComboBox::setId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CCol
if (!isset($opcondition['operator'])) {
$opcondition['operator'] = 0;
}
if (!isset($opcondition['value'])) {
$opcondition['value'] = 0;
}
if (!str_in_array($opcondition['conditiontype'], $allowed_opconditions)) {
continue;
}
$label = num2letter($i);
$labelCol = (new CCol($label))->addClass('label')->setAttribute('data-conditiontype', $opcondition['conditiontype'])->setAttribute('data-formulaid', $label);
$operationConditionsTable->addRow([$labelCol, getConditionDescription($opcondition['conditiontype'], $opcondition['operator'], $operationConditionStringValues[$cIdx]), (new CCol([(new CButton('remove', _('Remove')))->onClick('javascript: removeOperationCondition(' . $i . ');')->addClass(ZBX_STYLE_BTN_LINK), new CVar('new_operation[opconditions][' . $i . '][conditiontype]', $opcondition['conditiontype']), new CVar('new_operation[opconditions][' . $i . '][operator]', $opcondition['operator']), new CVar('new_operation[opconditions][' . $i . '][value]', $opcondition['value'])]))->addClass(ZBX_STYLE_NOWRAP)], null, 'opconditions_' . $i);
$i++;
}
$calcTypeComboBox = new CComboBox('new_operation[evaltype]', $this->data['new_operation']['evaltype'], 'submit()', [CONDITION_EVAL_TYPE_AND_OR => _('And/Or'), CONDITION_EVAL_TYPE_AND => _('And'), CONDITION_EVAL_TYPE_OR => _('Or')]);
$calcTypeComboBox->setId('operationEvaltype');
$new_operation_formlist->addRow(_('Type of calculation'), [$calcTypeComboBox, (new CDiv())->addClass(ZBX_STYLE_FORM_INPUT_MARGIN), (new CSpan())->setId('operationConditionLabel')]);
if (!isset($_REQUEST['new_opcondition'])) {
$operationConditionsTable->addRow((new CCol((new CSubmit('new_opcondition', _('New')))->addClass(ZBX_STYLE_BTN_LINK)))->setColspan(3));
}
$new_operation_formlist->addRow(_('Conditions'), (new CDiv($operationConditionsTable))->addClass(ZBX_STYLE_TABLE_FORMS_SEPARATOR)->setAttribute('style', 'min-width: ' . ZBX_TEXTAREA_STANDARD_WIDTH . 'px;'));
}
// append new operation condition to form list
if (isset($_REQUEST['new_opcondition'])) {
$newOperationConditionTable = (new CTable())->setAttribute('style', 'width: 100%;');
$allowedOpConditions = get_opconditions_by_eventsource($this->data['eventsource']);
$new_opcondition = getRequest('new_opcondition', []);
if (!is_array($new_opcondition)) {
$new_opcondition = [];
}
if (empty($new_opcondition)) {