本文整理汇总了PHP中HTMLForm::setDisplayFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP HTMLForm::setDisplayFormat方法的具体用法?PHP HTMLForm::setDisplayFormat怎么用?PHP HTMLForm::setDisplayFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLForm
的用法示例。
在下文中一共展示了HTMLForm::setDisplayFormat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: alterForm
protected function alterForm(HTMLForm $form)
{
$form->setDisplayFormat('vform');
$form->setId('mw-changeemail-form');
$form->setTableId('mw-changeemail-table');
$form->setWrapperLegend(false);
$form->setSubmitTextMsg('changeemail-submit');
$form->addHiddenField('returnto', $this->getRequest()->getVal('returnto'));
}
示例2: alterForm
public function alterForm(HTMLForm $form)
{
global $wgPasswordResetRoutes;
$form->setDisplayFormat('vform');
// Turn the old-school line around the form off.
// XXX This wouldn't be necessary here if we could set the format of
// the HTMLForm to 'vform' at its creation, but there's no way to do so
// from a FormSpecialPage class.
$form->setWrapperLegend(false);
$form->addHiddenFields($this->getRequest()->getValues('returnto', 'returntoquery'));
$i = 0;
if (isset($wgPasswordResetRoutes['username']) && $wgPasswordResetRoutes['username']) {
$i++;
}
if (isset($wgPasswordResetRoutes['email']) && $wgPasswordResetRoutes['email']) {
$i++;
}
if (isset($wgPasswordResetRoutes['domain']) && $wgPasswordResetRoutes['domain']) {
$i++;
}
$message = $i > 1 ? 'passwordreset-text-many' : 'passwordreset-text-one';
$form->setHeaderText($this->msg($message, $i)->parseAsBlock());
$form->setSubmitTextMsg('mailmypassword');
}
示例3: alterForm
public function alterForm(HTMLForm $form)
{
$form->setDisplayFormat('vform');
$form->setWrapperLegend(false);
}
示例4: alterForm
public function alterForm(HTMLForm $form)
{
$form->setDisplayFormat('vform');
$form->setWrapperLegend(false);
wfRunHooks('LanguageSelector', array($this->getOutput(), 'mw-languageselector'));
}
示例5: alterForm
protected function alterForm(HTMLForm &$form)
{
$form->setDisplayFormat('div');
// Suppress default submit, so we can add one that is slightly nicer looking
$form->suppressDefaultSubmit();
$form->addButton('submit', $this->msg('htmlform-submit')->text(), null, array('class' => 'btn'));
}