本文整理匯總了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'));
}