本文整理汇总了PHP中Linker::tooltipAndAccesskeyAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP Linker::tooltipAndAccesskeyAttribs方法的具体用法?PHP Linker::tooltipAndAccesskeyAttribs怎么用?PHP Linker::tooltipAndAccesskeyAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linker
的用法示例。
在下文中一共展示了Linker::tooltipAndAccesskeyAttribs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getButtons
function getButtons()
{
$buttons = '';
if ($this->mShowSubmit) {
$attribs = array();
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['class'] = array('mw-htmlform-submit', 'mw-ui-button mw-ui-big mw-ui-block', $this->mSubmitModifierClass);
$buttons .= Xml::submitButton($this->getSubmitText(), $attribs) . "\n";
}
if ($this->mShowReset) {
$buttons .= Html::element('input', array('type' => 'reset', 'value' => $this->msg('htmlform-reset')->text(), 'class' => 'mw-ui-button mw-ui-big mw-ui-block')) . "\n";
}
foreach ($this->mButtons as $button) {
$attrs = array('type' => 'submit', 'name' => $button['name'], 'value' => $button['value']);
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
$attrs['class'] = isset($attrs['class']) ? (array) $attrs['class'] : array();
$attrs['class'][] = 'mw-ui-button mw-ui-big mw-ui-block';
$buttons .= Html::element('input', $attrs) . "\n";
}
$html = Html::rawElement('div', array('class' => 'mw-htmlform-submit-buttons'), "\n{$buttons}") . "\n";
return $html;
}
示例2: getButtons
function getButtons()
{
$buttons = '';
// IE<8 has bugs with <button>, so we'll need to avoid them.
$isBadIE = preg_match('/MSIE [1-7]\\./i', $this->getRequest()->getHeader('User-Agent'));
if ($this->mShowSubmit) {
$attribs = ['infusable' => true];
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['classes'] = ['mw-htmlform-submit'];
$attribs['type'] = 'submit';
$attribs['label'] = $this->getSubmitText();
$attribs['value'] = $this->getSubmitText();
$attribs['flags'] = $this->mSubmitFlags;
$attribs['useInputTag'] = $isBadIE;
$buttons .= new OOUI\ButtonInputWidget($attribs);
}
if ($this->mShowReset) {
$buttons .= new OOUI\ButtonInputWidget(['type' => 'reset', 'label' => $this->msg('htmlform-reset')->text(), 'useInputTag' => $isBadIE]);
}
foreach ($this->mButtons as $button) {
$attrs = [];
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
if ($isBadIE) {
$label = $button['value'];
} elseif (isset($button['label-message'])) {
$label = new OOUI\HtmlSnippet($this->getMessage($button['label-message'])->parse());
} elseif (isset($button['label'])) {
$label = $button['label'];
} elseif (isset($button['label-raw'])) {
$label = new OOUI\HtmlSnippet($button['label-raw']);
} else {
$label = $button['value'];
}
$attrs['classes'] = isset($attrs['class']) ? (array) $attrs['class'] : [];
$buttons .= new OOUI\ButtonInputWidget(['type' => 'submit', 'name' => $button['name'], 'value' => $button['value'], 'label' => $label, 'flags' => $button['flags'], 'useInputTag' => $isBadIE] + $attrs);
}
if (!$buttons) {
return '';
}
return Html::rawElement('div', ['class' => 'mw-htmlform-submit-buttons'], "\n{$buttons}") . "\n";
}
示例3: getButtons
function getButtons()
{
$buttons = '';
if ($this->mShowSubmit) {
$attribs = [];
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['class'] = ['mw-htmlform-submit', 'mw-ui-button mw-ui-big mw-ui-block'];
foreach ($this->mSubmitFlags as $flag) {
$attribs['class'][] = 'mw-ui-' . $flag;
}
$buttons .= Xml::submitButton($this->getSubmitText(), $attribs) . "\n";
}
if ($this->mShowReset) {
$buttons .= Html::element('input', ['type' => 'reset', 'value' => $this->msg('htmlform-reset')->text(), 'class' => 'mw-ui-button mw-ui-big mw-ui-block']) . "\n";
}
if ($this->mShowCancel) {
$target = $this->mCancelTarget ?: Title::newMainPage();
if ($target instanceof Title) {
$target = $target->getLocalURL();
}
$buttons .= Html::element('a', ['class' => 'mw-ui-button mw-ui-big mw-ui-block', 'href' => $target], $this->msg('cancel')->text()) . "\n";
}
foreach ($this->mButtons as $button) {
$attrs = ['type' => 'submit', 'name' => $button['name'], 'value' => $button['value']];
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
$attrs['class'] = isset($attrs['class']) ? (array) $attrs['class'] : [];
$attrs['class'][] = 'mw-ui-button mw-ui-big mw-ui-block';
$buttons .= Html::element('input', $attrs) . "\n";
}
if (!$buttons) {
return '';
}
return Html::rawElement('div', ['class' => 'mw-htmlform-submit-buttons'], "\n{$buttons}") . "\n";
}
示例4: getButtons
function getButtons()
{
$buttons = '';
if ($this->mShowSubmit) {
$attribs = array('infusable' => true);
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['classes'] = array('mw-htmlform-submit');
$attribs['type'] = 'submit';
$attribs['label'] = $this->getSubmitText();
$attribs['value'] = $this->getSubmitText();
$attribs['flags'] = $this->mSubmitFlags;
$buttons .= new OOUI\ButtonInputWidget($attribs);
}
if ($this->mShowReset) {
$buttons .= new OOUI\ButtonInputWidget(array('type' => 'reset', 'label' => $this->msg('htmlform-reset')->text()));
}
foreach ($this->mButtons as $button) {
$attrs = array();
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
$attrs['classes'] = isset($attrs['class']) ? (array) $attrs['class'] : array();
$buttons .= new OOUI\ButtonInputWidget(array('type' => 'submit', 'name' => $button['name'], 'value' => $button['value'], 'label' => $button['value']) + $attrs);
}
$html = Html::rawElement('div', array('class' => 'mw-htmlform-submit-buttons'), "\n{$buttons}") . "\n";
return $html;
}
示例5: tooltipAndAccesskeyAttribs
public function tooltipAndAccesskeyAttribs($name, array $msgParams = [])
{
return Linker::tooltipAndAccesskeyAttribs($name, $msgParams);
}
示例6: customBox
function customBox($bar, $cont)
{
?>
<li class='widget-container' id='<?php
echo Sanitizer::escapeId("p-{$bar}");
?>
'<?php
echo Linker::tooltip('p-' . $bar);
?>
>
<h3 class="widget-title">
<?php
$out = wfMsg($bar);
if (wfEmptyMsg($bar, $out)) {
echo htmlspecialchars($bar);
} else {
echo htmlspecialchars($out);
}
?>
</h3>
<?php
if (is_array($cont)) {
?>
<ul>
<?php
foreach ($cont as $key => $val) {
?>
<li id="<?php
echo Sanitizer::escapeId($val['id']);
?>
"<?php
if ($val['active']) {
?>
class="active" <?php
}
?>
><a href="<?php
echo htmlspecialchars($val['href']);
?>
"<?php
echo Linker::tooltipAndAccesskeyAttribs($val['id']);
?>
>
<?php
echo htmlspecialchars($val['text']);
?>
</a>
</li>
<?php
}
?>
</ul>
<?php
} else {
# allow raw HTML block to be defined by extensions
print $cont;
}
echo '</li>';
}
示例7: getStartBody
/**
* Creates begin of history list with a submit button
*
* @return string HTML output
*/
function getStartBody()
{
$this->lastRow = false;
$this->counter = 1;
$this->oldIdChecked = 0;
$this->getOutput()->wrapWikiMsg("<div class='mw-history-legend'>\n\$1\n</div>", 'histlegend');
$s = Html::openElement('form', ['action' => wfScript(), 'id' => 'mw-history-compare']) . "\n";
$s .= Html::hidden('title', $this->getTitle()->getPrefixedDBkey()) . "\n";
$s .= Html::hidden('action', 'historysubmit') . "\n";
$s .= Html::hidden('type', 'revision') . "\n";
// Button container stored in $this->buttons for re-use in getEndBody()
$this->buttons = '<div>';
$className = 'historysubmit mw-history-compareselectedversions-button';
$attrs = ['class' => $className] + Linker::tooltipAndAccesskeyAttribs('compareselectedversions');
$this->buttons .= $this->submitButton($this->msg('compareselectedversions')->text(), $attrs) . "\n";
$user = $this->getUser();
$actionButtons = '';
if ($user->isAllowed('deleterevision')) {
$actionButtons .= $this->getRevisionButton('revisiondelete', 'showhideselectedversions');
}
if ($this->showTagEditUI) {
$actionButtons .= $this->getRevisionButton('editchangetags', 'history-edit-tags');
}
if ($actionButtons) {
$this->buttons .= Xml::tags('div', ['class' => 'mw-history-revisionactions'], $actionButtons);
}
if ($user->isAllowed('deleterevision') || $this->showTagEditUI) {
$this->buttons .= (new ListToggle($this->getOutput()))->getHTML();
}
$this->buttons .= '</div>';
$s .= $this->buttons;
$s .= '<ul id="pagehistory">' . "\n";
return $s;
}
示例8: getTooltipAndAccessKey
/**
* Returns the attributes required for the tooltip and accesskey.
*
* @return array Attributes
*/
public function getTooltipAndAccessKey()
{
if (empty($this->mParams['tooltip'])) {
return array();
}
return Linker::tooltipAndAccesskeyAttribs($this->mParams['tooltip']);
}
示例9: tooltipAndAccesskey
function tooltipAndAccesskey($name)
{
global $wgVersion;
if (version_compare($wgVersion, '1.18.0', '<')) {
return $this->skin->tooltipAndAccesskey($name);
} else {
$retrunString = ' ';
foreach (Linker::tooltipAndAccesskeyAttribs($name) as $key => $item) {
$retrunString += $key + '="' + $item + '" ';
}
return $retrunString;
}
}
示例10: cactions
/**
* Prints the cactions bar.
* Shared between MonoBook and Modern
*/
function cactions()
{
?>
<div id="p-cactions" class="portlet">
<h2><?php
$this->msg('views');
?>
</h2>
<div class="pBody">
<ul><?php
foreach ($this->data['content_actions'] as $key => $tab) {
$linkAttribs = array('href' => $tab['href']);
if (isset($tab["tooltiponly"]) && $tab["tooltiponly"]) {
$title = Linker::titleAttrib("ca-{$key}");
if ($title !== false) {
$linkAttribs['title'] = $title;
}
} else {
$linkAttribs += Linker::tooltipAndAccesskeyAttribs("ca-{$key}");
}
$linkHtml = Html::element('a', $linkAttribs, $tab['text']);
/* Surround with a <li> */
$liAttribs = array('id' => Sanitizer::escapeId("ca-{$key}"));
if ($tab['class']) {
$liAttribs['class'] = $tab['class'];
}
echo '
' . Html::rawElement('li', $liAttribs, $linkHtml);
}
?>
</ul>
</div>
</div>
<?php
}
示例11: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
global $wgLang, $wgVectorUseIconWatch;
$this->skin = $this->data['skin'];
// Build additional attributes for navigation urls
//$nav = $this->skin->buildNavigationUrls();
$nav = $this->data['content_navigation'];
if ($wgVectorUseIconWatch) {
$mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ($wgLang->isRTL()) {
$this->data['view_urls'] = array_reverse($this->data['view_urls']);
$this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
$this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
}
// Output HTML Page
$this->html('headelement');
?>
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<!-- content -->
<div id="content">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php
$this->html('userlangattributes');
?>
></div>
<?php
if ($this->data['sitenotice']) {
?>
<!-- sitenotice -->
<div id="siteNotice"><?php
$this->html('sitenotice');
?>
</div>
<!-- /sitenotice -->
<?php
}
?>
<!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading"><?php
$this->html('title');
?>
</h1>
<!-- /firstHeading -->
<!-- bodyContent -->
<div id="bodyContent">
<?php
if ($this->data['isarticle']) {
?>
<!-- tagline -->
<div id="siteSub"><?php
$this->msg('tagline');
?>
</div>
<!-- /tagline -->
<?php
}
?>
<!-- subtitle -->
<div id="contentSub"<?php
$this->html('userlangattributes');
?>
><?php
$this->html('subtitle');
?>
</div>
//.........这里部分代码省略.........
示例12: getButtons
/**
* Get the submit and (potentially) reset buttons.
* @return string HTML.
*/
function getButtons()
{
$buttons = '';
$useMediaWikiUIEverywhere = $this->getConfig()->get('UseMediaWikiUIEverywhere');
if ($this->mShowSubmit) {
$attribs = array();
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['class'] = array('mw-htmlform-submit');
if ($useMediaWikiUIEverywhere) {
foreach ($this->mSubmitFlags as $flag) {
array_push($attribs['class'], 'mw-ui-' . $flag);
}
array_push($attribs['class'], 'mw-ui-button');
}
$buttons .= Xml::submitButton($this->getSubmitText(), $attribs) . "\n";
}
if ($this->mShowReset) {
$buttons .= Html::element('input', array('type' => 'reset', 'value' => $this->msg('htmlform-reset')->text(), 'class' => $useMediaWikiUIEverywhere ? 'mw-ui-button' : null)) . "\n";
}
// IE<8 has bugs with <button>, so we'll need to avoid them.
$isBadIE = preg_match('/MSIE [1-7]\\./i', $this->getRequest()->getHeader('User-Agent'));
foreach ($this->mButtons as $button) {
$attrs = array('type' => 'submit', 'name' => $button['name'], 'value' => $button['value']);
if (isset($button['label-message'])) {
$label = $this->msg($button['label-message'])->parse();
} elseif (isset($button['label'])) {
$label = htmlspecialchars($button['label']);
} elseif (isset($button['label-raw'])) {
$label = $button['label-raw'];
} else {
$label = htmlspecialchars($button['value']);
}
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
if ($useMediaWikiUIEverywhere) {
$attrs['class'] = isset($attrs['class']) ? (array) $attrs['class'] : array();
$attrs['class'][] = 'mw-ui-button';
}
if ($isBadIE) {
$buttons .= Html::element('input', $attrs) . "\n";
} else {
$buttons .= Html::rawElement('button', $attrs, $label) . "\n";
}
}
$html = Html::rawElement('span', array('class' => 'mw-htmlform-submit-buttons'), "\n{$buttons}") . "\n";
return $html;
}
示例13: showForm
private function showForm()
{
$action = $this->getPageTitle()->getLocalURL(array('action' => 'submit'));
$user = $this->getUser();
$out = $this->getOutput();
$importSources = $this->getConfig()->get('ImportSources');
if ($user->isAllowed('importupload')) {
$out->addHTML(Xml::fieldset($this->msg('import-upload')->text()) . Xml::openElement('form', array('enctype' => 'multipart/form-data', 'method' => 'post', 'action' => $action, 'id' => 'mw-import-upload-form')) . $this->msg('importtext')->parseAsBlock() . Html::hidden('action', 'submit') . Html::hidden('source', 'upload') . Xml::openElement('table', array('id' => 'mw-import-table-upload')) . "<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-upload-filename')->text(), 'xmlimport') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Html::input('xmlimport', '', 'file', array('id' => 'xmlimport')) . ' ' . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-comment')->text(), 'mw-import-comment') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::input('log-comment', 50, $this->sourceName == 'upload' ? $this->logcomment : '', array('id' => 'mw-import-comment', 'type' => 'text')) . ' ' . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-interwiki-rootpage')->text(), 'mw-interwiki-rootpage-upload') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::input('rootpage', 50, $this->rootpage, array('id' => 'mw-interwiki-rootpage-upload', 'type' => 'text')) . ' ' . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td class='mw-submit'>" . Xml::submitButton($this->msg('uploadbtn')->text()) . "</td>\n\t\t\t\t</tr>" . Xml::closeElement('table') . Html::hidden('editToken', $user->getEditToken()) . Xml::closeElement('form') . Xml::closeElement('fieldset'));
} else {
if (empty($importSources)) {
$out->addWikiMsg('importnosources');
}
}
if ($user->isAllowed('import') && !empty($importSources)) {
# Show input field for import depth only if $wgExportMaxLinkDepth > 0
$importDepth = '';
if ($this->getConfig()->get('ExportMaxLinkDepth') > 0) {
$importDepth = "<tr>\n\t\t\t\t\t\t\t<td class='mw-label'>" . $this->msg('export-pagelinks')->parse() . "</td>\n\t\t\t\t\t\t\t<td class='mw-input'>" . Xml::input('pagelink-depth', 3, 0) . "</td>\n\t\t\t\t</tr>";
}
$out->addHTML(Xml::fieldset($this->msg('importinterwiki')->text()) . Xml::openElement('form', array('method' => 'post', 'action' => $action, 'id' => 'mw-import-interwiki-form')) . $this->msg('import-interwiki-text')->parseAsBlock() . Html::hidden('action', 'submit') . Html::hidden('source', 'interwiki') . Html::hidden('editToken', $user->getEditToken()) . Xml::openElement('table', array('id' => 'mw-import-table-interwiki')) . "<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-interwiki-sourcewiki')->text(), 'interwiki') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::openElement('select', array('name' => 'interwiki', 'id' => 'interwiki')));
$needSubprojectField = false;
foreach ($importSources as $key => $value) {
if (is_int($key)) {
$key = $value;
} elseif ($value !== $key) {
$needSubprojectField = true;
}
$attribs = array('value' => $key);
if (is_array($value)) {
$attribs['data-subprojects'] = implode(' ', $value);
}
if ($this->interwiki === $key) {
$attribs['selected'] = 'selected';
}
$out->addHTML(Html::element('option', $attribs, $key));
}
$out->addHTML(Xml::closeElement('select'));
if ($needSubprojectField) {
$out->addHTML(Xml::openElement('select', array('name' => 'subproject', 'id' => 'subproject')));
$subprojectsToAdd = array();
foreach ($importSources as $key => $value) {
if (is_array($value)) {
$subprojectsToAdd = array_merge($subprojectsToAdd, $value);
}
}
$subprojectsToAdd = array_unique($subprojectsToAdd);
sort($subprojectsToAdd);
foreach ($subprojectsToAdd as $subproject) {
$out->addHTML(Xml::option($subproject, $subproject, $this->subproject === $subproject));
}
$out->addHTML(Xml::closeElement('select'));
}
$out->addHTML("</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-interwiki-sourcepage')->text(), 'frompage') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::input('frompage', 50, $this->frompage, array('id' => 'frompage')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::checkLabel($this->msg('import-interwiki-history')->text(), 'interwikiHistory', 'interwikiHistory', $this->history) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::checkLabel($this->msg('import-interwiki-templates')->text(), 'interwikiTemplates', 'interwikiTemplates', $this->includeTemplates) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t{$importDepth}\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-interwiki-namespace')->text(), 'namespace') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Html::namespaceSelector(array('selected' => $this->namespace, 'all' => ''), array('name' => 'namespace', 'id' => 'namespace', 'class' => 'namespaceselector')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-comment')->text(), 'mw-interwiki-comment') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::input('log-comment', 50, $this->sourceName == 'interwiki' ? $this->logcomment : '', array('id' => 'mw-interwiki-comment', 'type' => 'text')) . ' ' . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label($this->msg('import-interwiki-rootpage')->text(), 'mw-interwiki-rootpage-interwiki') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::input('rootpage', 50, $this->rootpage, array('id' => 'mw-interwiki-rootpage-interwiki', 'type' => 'text')) . ' ' . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class='mw-submit'>" . Xml::submitButton($this->msg('import-interwiki-submit')->text(), Linker::tooltipAndAccesskeyAttribs('import')) . "</td>\n\t\t\t\t</tr>" . Xml::closeElement('table') . Xml::closeElement('form') . Xml::closeElement('fieldset'));
}
}
示例14: getButtons
/**
* Get the submit and (potentially) reset buttons.
* @return String HTML.
*/
function getButtons()
{
$buttons = '';
if ($this->mShowSubmit) {
$attribs = array();
if (isset($this->mSubmitID)) {
$attribs['id'] = $this->mSubmitID;
}
if (isset($this->mSubmitName)) {
$attribs['name'] = $this->mSubmitName;
}
if (isset($this->mSubmitTooltip)) {
$attribs += Linker::tooltipAndAccesskeyAttribs($this->mSubmitTooltip);
}
$attribs['class'] = array('mw-htmlform-submit');
if ($this->isVForm()) {
// mw-ui-block is necessary because the buttons aren't necessarily in an
// immediate child div of the vform.
// @todo Let client specify if the primary submit button is progressive or destructive
array_push($attribs['class'], 'mw-ui-button', 'mw-ui-big', 'mw-ui-constructive', 'mw-ui-block');
}
$buttons .= Xml::submitButton($this->getSubmitText(), $attribs) . "\n";
}
if ($this->mShowReset) {
$buttons .= Html::element('input', array('type' => 'reset', 'value' => $this->msg('htmlform-reset')->text())) . "\n";
}
foreach ($this->mButtons as $button) {
$attrs = array('type' => 'submit', 'name' => $button['name'], 'value' => $button['value']);
if ($button['attribs']) {
$attrs += $button['attribs'];
}
if (isset($button['id'])) {
$attrs['id'] = $button['id'];
}
$buttons .= Html::element('input', $attrs) . "\n";
}
$html = Html::rawElement('span', array('class' => 'mw-htmlform-submit-buttons'), "\n{$buttons}") . "\n";
// Buttons are top-level form elements in table and div layouts,
// but vform wants all elements inside divs to get spaced-out block
// styling.
if ($this->mShowSubmit && $this->isVForm()) {
$html = Html::rawElement('div', null, "\n{$html}") . "\n";
}
return $html;
}
示例15: execute
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute()
{
// Build additional attributes for navigation urls
$nav = $this->data['content_navigation'];
if ($this->config->get('VectorUseIconWatch')) {
$mode = $this->getSkin()->getUser()->isWatched($this->getSkin()->getRelevantTitle()) ? 'unwatch' : 'watch';
if (isset($nav['actions'][$mode])) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim('icon ' . $nav['views'][$mode]['class'], ' ');
$nav['views'][$mode]['primary'] = true;
unset($nav['actions'][$mode]);
}
}
$xmlID = '';
foreach ($nav as $section => $links) {
foreach ($links as $key => $link) {
if ($section == 'views' && !(isset($link['primary']) && $link['primary'])) {
$link['class'] = rtrim('collapsible ' . $link['class'], ' ');
}
$xmlID = isset($link['id']) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] = ' id="' . Sanitizer::escapeId($xmlID) . '"';
if ($link['class']) {
$nav[$section][$key]['attributes'] .= ' class="' . htmlspecialchars($link['class']) . '"';
unset($nav[$section][$key]['class']);
}
if (isset($link['tooltiponly']) && $link['tooltiponly']) {
$nav[$section][$key]['key'] = Linker::tooltip($xmlID);
} else {
$nav[$section][$key]['key'] = Xml::expandAttributes(Linker::tooltipAndAccesskeyAttribs($xmlID));
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ($this->data['rtl']) {
$this->data['view_urls'] = array_reverse($this->data['view_urls']);
$this->data['namespace_urls'] = array_reverse($this->data['namespace_urls']);
$this->data['personal_urls'] = array_reverse($this->data['personal_urls']);
}
// Output HTML Page
$this->html('headelement');
?>
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
<a id="top"></a>
<?php
if ($this->data['sitenotice']) {
?>
<div id="siteNotice"><?php
$this->html('sitenotice');
?>
</div>
<?php
}
?>
<h1 id="firstHeading" class="firstHeading" lang="<?php
$this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
$this->text('pageLanguage');
?>
"><span dir="auto"><?php
$this->html('title');
?>
</span></h1>
<?php
$this->html('prebodyhtml');
?>
<div id="bodyContent" class="mw-body-content">
<?php
if ($this->data['isarticle']) {
?>
<div id="siteSub"><?php
$this->msg('tagline');
?>
</div>
<?php
}
?>
<div id="contentSub"<?php
$this->html('userlangattributes');
?>
><?php
$this->html('subtitle');
?>
</div>
<?php
if ($this->data['undelete']) {
?>
<div id="contentSub2"><?php
$this->html('undelete');
?>
</div>
<?php
//.........这里部分代码省略.........