當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OutputPage::prependHTML方法代碼示例

本文整理匯總了PHP中OutputPage::prependHTML方法的典型用法代碼示例。如果您正苦於以下問題:PHP OutputPage::prependHTML方法的具體用法?PHP OutputPage::prependHTML怎麽用?PHP OutputPage::prependHTML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OutputPage的用法示例。


在下文中一共展示了OutputPage::prependHTML方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addEditModule

 public static function addEditModule(EditPage $editPage, OutputPage $output)
 {
     $output->addModules('ext.wikieditor.huijiextra.top');
     $output->addModules('ext.wikieditor.huijiextra.bottom');
     $output->addHeadItem('loader', '<script language="JavaScript">' . "\n" . '$(window).load(function() {' . "\n" . '// Animate loader off screen' . "\n" . '$(".se-pre-con").fadeOut("slow");' . "\n" . 'var editFormSisyphus = $( "#editform" ).sisyphus( {' . "\n" . 'locationBased: true, ' . "\n" . 'timeout: 0,' . "\n" . 'autoRelease: true,' . "\n" . 'onBeforeRestore:function(){' . "\n" . '$("#autoRestoreModal").modal({' . "\n" . 'keyboard: false,' . "\n" . 'backdrop: "static"' . "\n" . '}); ' . "\n" . 'return false;' . "\n" . '}' . "\n" . '} ); ' . "\n" . '});' . "\n" . '</script>');
     $output->prependHTML('<div class="se-pre-con"></div>');
 }
開發者ID:volvor,項目名稱:bootstrap-mediawiki,代碼行數:7,代碼來源:BootstrapMediawikiHooks.php

示例2: maybeAddBacklogNotice

 protected static function maybeAddBacklogNotice(OutputPage &$out)
 {
     global $wgUser;
     if (!$wgUser->isAllowed('review')) {
         return true;
         // not relevant to user
     }
     $namespaces = FlaggedRevs::getReviewNamespaces();
     $watchlist = SpecialPage::getTitleFor('Watchlist');
     # Add notice to watchlist about pending changes...
     if ($out->getTitle()->equals($watchlist) && $namespaces) {
         $dbr = wfGetDB(DB_SLAVE, 'watchlist');
         // consistency with watchlist
         $watchedOutdated = (bool) $dbr->selectField(array('watchlist', 'page', 'flaggedpages'), '1', array('wl_user' => $wgUser->getId(), 'wl_namespace' => $namespaces, 'wl_namespace = page_namespace', 'wl_title = page_title', 'fp_page_id = page_id', 'fp_pending_since IS NOT NULL'), __METHOD__);
         # Give a notice if pages on the users's wachlist have pending edits
         if ($watchedOutdated) {
             $css = 'plainlinks fr-watchlist-pending-notice';
             $out->prependHTML("<div id='mw-fr-watchlist-pending-notice' class='{$css}'>" . wfMsgExt('flaggedrevs-watched-pending', 'parseinline') . "</div>");
         }
     }
     return true;
 }
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:22,代碼來源:FlaggedRevsUI.hooks.php


注:本文中的OutputPage::prependHTML方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。