本文整理汇总了PHP中SpecialVersion::getExtensionTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP SpecialVersion::getExtensionTypes方法的具体用法?PHP SpecialVersion::getExtensionTypes怎么用?PHP SpecialVersion::getExtensionTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpecialVersion
的用法示例。
在下文中一共展示了SpecialVersion::getExtensionTypes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayFilterControl
/**
* Creates and outputs the filter control.
*
* @since 0.1
*/
protected function displayFilterControl()
{
global $wgOut, $wgExtensionCredits;
$extensionAmount = 0;
$filterSegments = array();
$extensionTypes = SpecialVersion::getExtensionTypes();
foreach ($extensionTypes as $type => $message) {
if (!array_key_exists($type, $wgExtensionCredits)) {
continue;
}
$amount = count($wgExtensionCredits[$type]);
if ($amount > 0) {
$filterSegments[] = $this->getTypeLink($type, $message, $amount);
$extensionAmount += $amount;
}
}
$all = array($this->getTypeLink('all', wfMsg('extension-type-all'), $extensionAmount));
$wgOut->addHTML(implode(' | ', array_merge($all, $filterSegments)));
}