本文整理汇总了PHP中MWDebug::getDebugHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP MWDebug::getDebugHTML方法的具体用法?PHP MWDebug::getDebugHTML怎么用?PHP MWDebug::getDebugHTML使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MWDebug
的用法示例。
在下文中一共展示了MWDebug::getDebugHTML方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute($parameters)
{
$out = $this->getOutput();
$skin = $this->getSkin();
$this->setHeaders();
$out->setArticleBodyOnly(true);
// Default modules copied from OutputPage::addDefaultModules
$out->addModules(array('mediawiki.user', 'mediawiki.page.startup', 'mediawiki.page.ready'));
$out->addModules(array('ext.cx.header', 'ext.cx.stats'));
// Load legacy modules if any, for the skin.
// Some wikis have Common.js scripts that depend on this module.
$defaultSkinModules = $skin->getDefaultModules();
$out->addModules($defaultSkinModules['legacy']);
Hooks::run('BeforePageDisplay', array(&$out, &$skin));
$out->addHTML($out->headElement($skin));
$out->addHTML(Html::element('noscript', array(), $this->msg('cx-javascript')->text()));
$out->addHtml(MWDebug::getDebugHTML($this->getContext()));
$toolbarList = Html::rawElement('ul', null, $skin->getPersonalToolsList());
$out->addHTML(Html::rawElement('div', array('id' => 'p-personal'), $toolbarList));
$out->addHTML($skin->bottomScripts());
$out->addHTML('</body></html>');
}
开发者ID:Wikia,项目名称:mediawiki-extensions-ContentTranslation,代码行数:22,代码来源:SpecialContentTranslationStats.php
示例2: printTrail
/**
* Output the basic end-page trail including bottomscripts, reporttime, and
* debug stuff. This should be called right before outputting the closing
* body and html tags.
*/
function printTrail()
{
echo MWDebug::getDebugHTML($this->getSkin()->getContext());
$this->html('bottomscripts');
/* JS call to runBodyOnloadHook */
$this->html('reporttime');
}
示例3: execute
public function execute($parameters)
{
global $wgContentTranslationUseMagnusTool, $wgContentTranslationTranslateInTarget;
$out = $this->getOutput();
$skin = $this->getSkin();
$request = $this->getRequest();
$user = $this->getUser();
$hasToken = $this->hasToken();
$campaign = $request->getVal('campaign');
$isCampaign = $this->isValidCampaign($campaign);
// Direct access, isListed only affects Special:SpecialPages
if (!ContentTranslationHooks::isEnabledForUser($user)) {
if ($hasToken || $isCampaign) {
// User has a token. Enabled cx for the user in this wiki.
$this->enableCXBetaFeature();
} else {
if ($campaign) {
// Show login page if the URL has campaign parameter
$out->showPermissionsErrorPage(array(array('badaccess-groups')), 'edit');
return;
}
$out->showErrorPage('nosuchspecialpage', 'nospecialpagetext');
return;
}
}
// Preloading to avoid FOUC
$out->addModuleStyles('ext.cx.header.skin');
if ($hasToken) {
$out->addModules('ext.cx.translationview');
// If Wikibase is installed, load the module for linking
// the published article with the source article
if ($wgContentTranslationTranslateInTarget && defined('WBC_VERSION')) {
$out->addModules('ext.cx.wikibase.link');
}
} else {
$out->addModules('ext.cx.dashboard');
if ($wgContentTranslationUseMagnusTool) {
$out->addModules('ext.cx.magnuslink');
}
}
$this->setHeaders();
$out->setArticleBodyOnly(true);
// Default modules copied from OutputPage::addDefaultModules
$out->addModules(array('mediawiki.user', 'mediawiki.page.startup', 'mediawiki.page.ready'));
// Load legacy modules if any, for the skin.
// Some wikis have Common.js scripts that depend on this module.
$defaultSkinModules = $skin->getDefaultModules();
$out->addModules($defaultSkinModules['legacy']);
Hooks::run('BeforePageDisplay', array(&$out, &$skin));
// T111668: Make sure we generate the personal tools
// before we output the head, as extensions may add
// things using the PersonalUrls hook.
$toolbarList = Html::rawElement('ul', null, $skin->getPersonalToolsList());
$out->addHTML($out->headElement($skin));
$out->addHTML(Html::element('noscript', array(), $this->msg('cx-javascript')->text()));
$out->addHtml(MWDebug::getDebugHTML($this->getContext()));
$out->addHTML(Html::rawElement('div', array('id' => 'p-personal'), $toolbarList));
$out->addHTML($skin->bottomScripts());
$out->addHTML('</body></html>');
}
开发者ID:Rjaylyn,项目名称:mediawiki-extensions-ContentTranslation,代码行数:60,代码来源:SpecialContentTranslation.php
示例4: printTrail
function printTrail()
{
echo MWDebug::getDebugHTML($this->getSkin()->getContext());
}
示例5: generateDebugHTML
/**
* Generate debug data HTML for displaying at the bottom of the main content
* area.
* @return String HTML containing debug data, if enabled (otherwise empty).
*/
protected function generateDebugHTML()
{
global $wgShowDebug;
$html = MWDebug::getDebugHTML($this->getContext());
if ($wgShowDebug) {
$listInternals = $this->formatDebugHTML($this->getOutput()->mDebugtext);
$html .= "\n<hr />\n<strong>Debug data:</strong><ul id=\"mw-debug-html\">" . $listInternals . "</ul>\n";
}
return $html;
}
示例6: render
/**
* Render the entire page
* @param array $data Data used to build the page
* @todo replace with template engines
*/
protected function render($data)
{
$templateParser = new TemplateParser(__DIR__);
$internalBanner = $data['internalBanner'];
$preBodyText = isset($data['prebodyhtml']) ? $data['prebodyhtml'] : '';
$data = array_merge($data, array('hasHistory' => isset($data['historyLink']), 'hasSubjectPage' => isset($data['subject-page']), 'isSpecialPage' => $this->isSpecialPage, 'hasPageActions' => count($this->getPageActions()), 'hasPreBodyText' => $internalBanner || $preBodyText || isset($data['page_actions']), 'footerRows' => $this->getFooterRows($data), 'debug' => MWDebug::getDebugHTML($this->getSkin()->getContext()), 'pageactionshtml' => $this->getPageActionsHtml($data), 'secondaryactionshtml' => $this->getSecondaryActionsHtml(), 'searchhtml' => $this->getSearchForm($data)));
echo $templateParser->processTemplate('minervaNeue', $data);
}