本文整理汇总了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;
}
示例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;
}
示例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;
}