当前位置: 首页>>代码示例>>PHP>>正文


PHP Form_Group::enableDuplication方法代码示例

本文整理汇总了PHP中Form_Group::enableDuplication方法的典型用法代码示例。如果您正苦于以下问题:PHP Form_Group::enableDuplication方法的具体用法?PHP Form_Group::enableDuplication怎么用?PHP Form_Group::enableDuplication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form_Group的用法示例。


在下文中一共展示了Form_Group::enableDuplication方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createDestinationServerInputGroup

function createDestinationServerInputGroup($value = null)
{
    $group = new Form_Group('Destination server');
    $group->add(new Form_IpAddress('server', 'Destination server', $value))->setWidth(4)->setHelp('This is the IPv6 address of the server to which DHCPv6 requests are relayed.')->setIsRepeated();
    $group->enableDuplication(null, true);
    // Buttons are in-line with the input
    return $group;
}
开发者ID:hexaclock,项目名称:pfsense,代码行数:8,代码来源:services_dhcpv6_relay.php

示例2: Form

$form = new Form(new Form_Button('Submit', gettext("Save")));
$section = new Form_Section('QinQ Configuration');
$section->addInput(new Form_Select('if', 'Parent interface', $pconfig['if'], build_parent_list()))->setHelp('Only QinQ capable interfaces will be shown.');
$section->addInput(new Form_Input('tag', 'First level tag', 'number', $pconfig['tag'], ['max' => '4094', 'min' => '1']))->setHelp('This is the first level VLAN tag. On top of this are stacked the member VLANs defined below.');
$section->addInput(new Form_Checkbox('autogroup', 'Option(s)', 'Adds interface to QinQ interface groups', $pconfig['autogroup']))->setHelp('Allows rules to be written more easily');
$section->addInput(new Form_Input('descr', 'Description', 'text', $pconfig['descr']))->setHelp('You may enter a description here for your reference (not parsed).');
$section->addInput(new Form_StaticText('Member(s)', 'You can specify ranges in the inputs below. Enter a range (2-3) or individual numbers.' . '<br />' . 'Click "Duplicate" as many times as needed to add new inputs'));
if (isset($id) && $a_qinqs[$id]) {
    $section->addInput(new Form_Input('id', null, 'hidden', $id));
}
$counter = 0;
$members = $pconfig['members'];
// List each of the member tags from the space-separated list
if ($members != "") {
    $item = explode(" ", $members);
} else {
    $item = array('');
}
foreach ($item as $ww) {
    $member = $item[$counter];
    $group = new Form_Group($counter == 0 ? 'Tag(s)' : '');
    $group->add(new Form_Input('members', null, 'text', $ww))->setWidth(6);
    // Width must be <= 8 to make room for the duplication buttons
    $counter++;
    $group->enableDuplication(null, true);
    // Buttons are in-line with the input
    $section->add($group);
}
$form->add($section);
print $form;
include "foot.inc";
开发者ID:nwholloway,项目名称:pfsense,代码行数:31,代码来源:interfaces_qinq_edit.php


注:本文中的Form_Group::enableDuplication方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。