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


PHP SpecialPage::getPageTitle方法代碼示例

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


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

示例1: executeSpecialPage

 /**
  * @param SpecialPage $page The special page to execute
  * @param string $subPage The subpage parameter to call the page with
  * @param WebRequest|null $request Web request that may contain URL parameters, etc
  * @param Language|string|null $language The language which should be used in the context
  * @param User|null $user The user which should be used in the context of this special page
  *
  * @throws Exception
  * @return array( string, WebResponse ) A two-elements array containing the HTML output
  * generated by the special page as well as the response object.
  */
 public function executeSpecialPage(SpecialPage $page, $subPage = '', WebRequest $request = null, $language = null, User $user = null)
 {
     $context = $this->newContext($request, $language, $user);
     $output = new OutputPage($context);
     $context->setOutput($output);
     $page->setContext($context);
     $output->setTitle($page->getPageTitle());
     $html = $this->getHTMLFromSpecialPage($page, $subPage);
     $response = $context->getRequest()->response();
     if ($response instanceof FauxResponse) {
         $code = $response->getStatusCode();
         if ($code > 0) {
             $response->header('Status: ' . $code . ' ' . HttpStatus::getMessage($code));
         }
     }
     return [$html, $response];
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:28,代碼來源:SpecialPageExecutor.php

示例2: formatActionValue

 /**
  * @return string Formatted table cell contents
  */
 protected function formatActionValue($row)
 {
     $target = SpecialGlobalRenameQueue::PAGE_PROCESS_REQUEST . '/' . $row->rq_id;
     if ($this->showOpenRequests()) {
         $label = 'globalrenamequeue-action-address';
     } else {
         $target .= '/' . SpecialGlobalRenameQueue::ACTION_VIEW;
         $label = 'globalrenamequeue-action-view';
     }
     return Html::element('a', array('href' => $this->mOwner->getPageTitle($target)->getFullURL(), 'class' => 'mw-ui-progressive'), $this->msg($label)->text());
 }
開發者ID:NDKilla,項目名稱:mediawiki-extensions-CentralAuth,代碼行數:14,代碼來源:SpecialGlobalRenameQueue.php

示例3: getPageTitle

 /**
  * Get the Title being used for this instance.
  * SpecialPage extends ContextSource as of 1.18.
  *
  * @since 0.1
  *
  * @param boolean $subPage
  *
  * @return Title
  */
 public function getPageTitle($subPage = false)
 {
     return version_compare($GLOBALS['wgVersion'], '1.18', '>') ? parent::getPageTitle() : $GLOBALS['wgTitle'];
 }
開發者ID:BITPlan,項目名稱:Push,代碼行數:14,代碼來源:Push_Body.php


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