OutputPage::getCategories(): Add a possibility to distinguish "normal" and "hidden...
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 8 Jul 2016 19:11:53 +0000 (21:11 +0200)
committerKrinkle <krinklemail@gmail.com>
Fri, 25 Nov 2016 00:02:28 +0000 (00:02 +0000)
commitf4b8549f5fad898449f92f0878780dbb6bb9afc0
treeeaa33b3d7af95fdcfe76a345eba5c069e3a87218
parent31a3a94d20e2cd549c148019aa52af978d312623
OutputPage::getCategories(): Add a possibility to distinguish "normal" and "hidden" categories

There's currently no way to get, e.g., all categories except the
hidden ones just as text. The OutputPage::getCategories() method
always returns all categories as an array of strings (titles) and
the getCategoryLinks() method returns the result of Linker::link
but with the distinction between "normal" and "hidden" categories.

This change adds a new parameter to OutputPage::getCategories(),
$type, which can be used to define, what categories should be
returned. The default value is "all", which means, that all categories
are returned (the current result of the method). With the value
"normal" and "hidden", the method will return the respective values.

This could be used in I97d7de723fe72da26c7dbde0a559a13704c7099a to
remove the stupid Linker::link() and isset workaround.

Change-Id: Iadda9ae362a21fbee770240234b8f55326219932
includes/OutputPage.php
tests/phpunit/includes/OutputPageTest.php