本文整理汇总了PHP中Horde_Form::Horde_Form方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Form::Horde_Form方法的具体用法?PHP Horde_Form::Horde_Form怎么用?PHP Horde_Form::Horde_Form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde_Form
的用法示例。
在下文中一共展示了Horde_Form::Horde_Form方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ServerSettings
function ServerSettings(&$vars)
{
parent::Horde_Form($vars);
$this->addHidden('', 'actionId', 'text', true);
$vars->set('actionId', 'serversettings');
$this->addVariable(_("Server Name"), 'servername', 'text', true);
$this->addVariable(_("Server Port"), 'port', 'int', false);
$this->addVariable(_("Player Password"), 'playerpass', 'text', false);
$this->addVariable(_("DM Password"), 'dmpass', 'text', false);
$this->addVariable(_("Maximum Clients"), 'maxclients', 'int', true);
$this->addVariable(_("Minimum Player Level"), 'minlevel', 'int', true);
$this->addVariable(_("Maximum Player Level"), 'maxlevel', 'int', true);
$this->addVariable(_("Pause And Play"), 'pauseandplay', 'enum', true, false, null, array(array('0' => 'DM Only', '1' => 'DM and Players')));
$this->addVariable(_("Player Vs Player"), 'pvp', 'enum', true, false, null, array(array('0' => 'None', '1' => 'Party Only', '2' => 'Free For All')));
$this->addVariable(_("Server Vault"), 'servervault', 'enum', true, false, null, array(array('0' => 'Local Characters Only', '1' => 'Server Characters Only')));
$this->addVariable(_("Enforce Legal Characters"), 'elc', 'enum', true, false, null, array(array('1' => 'Enforce Legal Characters', '0' => 'Any Characters')));
$this->addVariable(_("Item Level Restrictions"), 'ilr', 'enum', true, false, null, array(array('1' => 'Enforce Item Restrictions', '0' => 'Any Items')));
$this->addVariable(_("Game Type"), 'gametype', 'enum', true, false, null, array(array('0' => 'Action', '1' => 'Story', '2' => 'Story Lite', '3' => 'Role Play', '4' => 'Team', '5' => 'Melee', '6' => 'Arena', '7' => 'Aocial', '8' => 'Alternative', '9' => 'PW Action', '10' => 'PW Story', '11' => 'Solo', '12' => 'Tech Support')));
$this->addVariable(_("Parties"), 'oneparty', 'enum', true, false, null, array(array('0' => 'One Party', '1' => 'Multiple Parties')));
$this->addVariable(_("Difficulty"), 'difficulty', 'enum', true, false, null, array(array('1' => 'Easy', '2' => 'Normal', '3' => 'D&D Hardcore', '4' => 'Insane')));
$this->addVariable(_("Auto Save Interval"), 'autosaveinterval', 'int', true, false, _("In minutes, use 0 to disable"));
$this->addVariable(_("Persistence"), 'reloadwhenempty', 'enum', true, false, null, array(array('0' => 'Persistent Module', '1' => 'Reload When Empty')));
$this->addVariable(_("Server Visibility"), 'publicserver', 'enum', true, false, null, array(array('0' => 'Private', '1' => 'Public')));
$this->setTitle(_("Configure Server Settings"));
$this->setButtons(_("Update Config"));
}
示例2: NewNWNModule
function NewNWNModule(&$vars)
{
parent::Horde_Form($vars);
$this->addVariable(_("New Module"), 'module', 'file', true);
$this->setTitle(_("Upload New Module"));
$this->setButtons(_("Upload"));
$this->useToken(true);
}