本文整理匯總了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)));
}