本文整理匯總了PHP中HTMLForm::getButtons方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTMLForm::getButtons方法的具體用法?PHP HTMLForm::getButtons怎麽用?PHP HTMLForm::getButtons使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTMLForm
的用法示例。
在下文中一共展示了HTMLForm::getButtons方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getButtons
/**
* @return String
*/
function getButtons() {
if ( !$this->getModifiedUser()->isAllowedAny( 'editmyprivateinfo', 'editmyoptions' ) ) {
return '';
}
$html = parent::getButtons();
if ( $this->getModifiedUser()->isAllowed( 'editmyoptions' ) ) {
$t = SpecialPage::getTitleFor( 'Preferences', 'reset' );
$html .= "\n" . Linker::link( $t, $this->msg( 'restoreprefs' )->escaped() );
$html = Xml::tags( 'div', array( 'class' => 'mw-prefs-buttons' ), $html );
}
return $html;
}
示例2: getButtons
/**
* @return String
*/
function getButtons()
{
$html = parent::getButtons();
global $wgUser;
$sk = $wgUser->getSkin();
$t = SpecialPage::getTitleFor('Preferences', 'reset');
$html .= "\n" . $sk->link($t, wfMsgHtml('restoreprefs'));
$html = Xml::tags('div', array('class' => 'mw-prefs-buttons'), $html);
return $html;
}
示例3: getButtons
function getButtons()
{
$html = HTMLForm::getButtons();
$url = SpecialPage::getTitleFor('EditUser')->getFullURL(array('reset' => 1, 'username' => $this->getModifiedUser()->getName()));
$html .= "\n" . Xml::element('a', array('href' => $url), wfMsgHtml('restoreprefs'));
$html = Xml::tags('div', array('class' => 'mw-prefs-buttons'), $html);
return $html;
}
示例4: getButtons
/**
* @return String
*/
function getButtons()
{
$html = parent::getButtons();
$t = SpecialPage::getTitleFor('Preferences', 'reset');
$html .= "\n" . Linker::link($t, $this->msg('restoreprefs')->escaped());
$html = Xml::tags('div', array('class' => 'mw-prefs-buttons'), $html);
return $html;
}
示例5: getButtons
/**
* @return string
*/
function getButtons()
{
global $wgUseMediaWikiUIEverywhere;
$attrs = array('id' => 'mw-prefs-restoreprefs');
if ($wgUseMediaWikiUIEverywhere) {
$attrs['class'] = 'mw-ui-button mw-ui-quiet';
}
if (!$this->getModifiedUser()->isAllowedAny('editmyprivateinfo', 'editmyoptions')) {
return '';
}
$html = parent::getButtons();
if ($this->getModifiedUser()->isAllowed('editmyoptions')) {
$t = SpecialPage::getTitleFor('Preferences', 'reset');
$html .= "\n" . Linker::link($t, $this->msg('restoreprefs')->escaped(), $attrs);
$html = Xml::tags('div', array('class' => 'mw-prefs-buttons'), $html);
}
return $html;
}