当前位置: 首页>>代码示例>>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;未经允许,请勿转载。