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


PHP SpecialPageFactory::list方法代碼示例

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


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

示例1: getList

 /**
  * Get the special page list
  *
  * @return array
  */
 static function getList()
 {
     global $wgSpecialPages;
     global $wgDisableCounters, $wgDisableInternalSearch, $wgEmailAuthentication;
     global $wgEnableEmail, $wgEnableJavaScriptTest;
     if (!is_object(self::$list)) {
         wfProfileIn(__METHOD__);
         if (!$wgDisableCounters) {
             self::$list['Popularpages'] = 'PopularPagesPage';
         }
         if (!$wgDisableInternalSearch) {
             self::$list['Search'] = 'SpecialSearch';
         }
         if ($wgEmailAuthentication) {
             self::$list['Confirmemail'] = 'EmailConfirmation';
             self::$list['Invalidateemail'] = 'EmailInvalidation';
         }
         if ($wgEnableEmail) {
             self::$list['ChangeEmail'] = 'SpecialChangeEmail';
         }
         if ($wgEnableJavaScriptTest) {
             self::$list['JavaScriptTest'] = 'SpecialJavaScriptTest';
         }
         self::$list['Activeusers'] = 'SpecialActiveUsers';
         // Add extension special pages
         self::$list = array_merge(self::$list, $wgSpecialPages);
         // Run hooks
         // This hook can be used to remove undesired built-in special pages
         wfRunHooks('SpecialPage_initList', array(&self::$list));
         // Cast to object: func()[$key] doesn't work, but func()->$key does
         settype(self::$list, 'object');
         wfProfileOut(__METHOD__);
     }
     return self::$list;
 }
開發者ID:Tarendai,項目名稱:spring-website,代碼行數:40,代碼來源:SpecialPageFactory.php

示例2: getPageList

 /**
  * Get the special page list as an array
  *
  * @return array
  */
 private static function getPageList()
 {
     global $wgSpecialPages;
     global $wgDisableInternalSearch, $wgEmailAuthentication;
     global $wgEnableEmail, $wgEnableJavaScriptTest;
     global $wgPageLanguageUseDB, $wgContentHandlerUseDB;
     global $wgDisableAuthManager;
     if (!is_array(self::$list)) {
         self::$list = self::$coreList;
         if (!$wgDisableInternalSearch) {
             self::$list['Search'] = 'SpecialSearch';
         }
         if ($wgEmailAuthentication) {
             self::$list['Confirmemail'] = 'EmailConfirmation';
             self::$list['Invalidateemail'] = 'EmailInvalidation';
         }
         if ($wgEnableEmail) {
             self::$list['ChangeEmail'] = 'SpecialChangeEmailPreAuthManager';
         }
         if ($wgEnableJavaScriptTest) {
             self::$list['JavaScriptTest'] = 'SpecialJavaScriptTest';
         }
         if ($wgPageLanguageUseDB) {
             self::$list['PageLanguage'] = 'SpecialPageLanguage';
         }
         if ($wgContentHandlerUseDB) {
             self::$list['ChangeContentModel'] = 'SpecialChangeContentModel';
         }
         // horrible hack to allow selection between old and new classes via a feature flag - T110756
         // will be removed once AuthManager is stable
         if (!$wgDisableAuthManager) {
             self::$list = array_map(function ($class) {
                 return preg_replace('/PreAuthManager$/', '', $class);
             }, self::$list);
             self::$list['Userlogout'] = 'SpecialUserLogout';
             // case matters
         } else {
             self::$list['Userlogin'] = 'LoginForm';
             self::$list = array_diff_key(self::$list, array_fill_keys(['LinkAccounts', 'UnlinkAccounts', 'ChangeCredentials', 'RemoveCredentials'], true));
         }
         // Add extension special pages
         self::$list = array_merge(self::$list, $wgSpecialPages);
         // This hook can be used to disable unwanted core special pages
         // or conditionally register special pages.
         Hooks::run('SpecialPage_initList', [&self::$list]);
     }
     return self::$list;
 }
開發者ID:claudinec,項目名稱:galan-wiki,代碼行數:53,代碼來源:SpecialPageFactory.php

示例3: getPageList

 /**
  * Get the special page list as an array
  *
  * @return array
  */
 private static function getPageList()
 {
     global $wgSpecialPages;
     global $wgDisableInternalSearch, $wgEmailAuthentication;
     global $wgEnableEmail, $wgEnableJavaScriptTest;
     global $wgPageLanguageUseDB, $wgContentHandlerUseDB;
     if (!is_array(self::$list)) {
         self::$list = self::$coreList;
         if (!$wgDisableInternalSearch) {
             self::$list['Search'] = 'SpecialSearch';
         }
         if ($wgEmailAuthentication) {
             self::$list['Confirmemail'] = 'EmailConfirmation';
             self::$list['Invalidateemail'] = 'EmailInvalidation';
         }
         if ($wgEnableEmail) {
             self::$list['ChangeEmail'] = 'SpecialChangeEmail';
         }
         if ($wgEnableJavaScriptTest) {
             self::$list['JavaScriptTest'] = 'SpecialJavaScriptTest';
         }
         if ($wgPageLanguageUseDB) {
             self::$list['PageLanguage'] = 'SpecialPageLanguage';
         }
         if ($wgContentHandlerUseDB) {
             self::$list['ChangeContentModel'] = 'SpecialChangeContentModel';
         }
         self::$list['Activeusers'] = 'SpecialActiveUsers';
         // Add extension special pages
         self::$list = array_merge(self::$list, $wgSpecialPages);
         // This hook can be used to disable unwanted core special pages
         // or conditionally register special pages.
         Hooks::run('SpecialPage_initList', array(&self::$list));
     }
     return self::$list;
 }
開發者ID:hallowelt,項目名稱:mediawiki,代碼行數:41,代碼來源:SpecialPageFactory.php


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