本文整理汇总了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;
}