本文整理汇总了PHP中SpecialPageFactory::setGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP SpecialPageFactory::setGroup方法的具体用法?PHP SpecialPageFactory::setGroup怎么用?PHP SpecialPageFactory::setGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialPageFactory
的用法示例。
在下文中一共展示了SpecialPageFactory::setGroup方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onSpecialPage_initList
public static function onSpecialPage_initList( &$list ) {
global $wgOpenIDOnly, $wgOpenIDClientOnly;
if ( $wgOpenIDOnly ) {
$list['Userlogin'] = 'SpecialOpenIDLogin';
# as Special:CreateAccount is an alias for Special:UserLogin/signup
# we show our own OpenID page here, too
$list['CreateAccount'] = 'SpecialOpenIDLogin';
}
# Special pages are added at global scope;
# remove server-related ones if client-only flag is set
$addList = array( 'Login', 'Convert', 'Dashboard' );
if ( !$wgOpenIDClientOnly ) {
$addList[] = 'Server';
$addList[] = 'XRDS';
}
foreach ( $addList as $sp ) {
$list['OpenID' . $sp] = 'SpecialOpenID' . $sp;
SpecialPageFactory::setGroup( 'OpenID' . $sp, 'openid' );
}
return true;
}
示例2: __construct
function __construct( $name = 'RandomExcludeBlank' ){
global $wgContentNamespaces;
$this->namespaces = $wgContentNamespaces;
parent::__construct( $name );
SpecialPageFactory::setGroup( 'RandomExcludeBlank','redirects' );
}
示例3: setGroup
/**
* Add a page to a certain display group for Special:SpecialPages
*
* @param $page Mixed: SpecialPage or string
* @param $group String
* @deprecated since 1.18 call SpecialPageFactory method directly
*/
static function setGroup($page, $group)
{
wfDeprecated(__METHOD__, '1.18');
SpecialPageFactory::setGroup($page, $group);
}
示例4: __construct
public function __construct()
{
parent::__construct("WikiStats", "", true);
SpecialPageFactory::setGroup('WikiStats', 'wiki');
}
示例5: setGroup
/**
* Add a page to a certain display group for Special:SpecialPages
*
* @param $page Mixed: SpecialPage or string
* @param $group String
* @return null
* @deprecated since 1.18 call SpecialPageFactory method directly
*/
static function setGroup($page, $group)
{
return SpecialPageFactory::setGroup($page, $group);
}