MediaWiki
REL1_22
|
Public Member Functions | |
__construct ($title, IContextSource $context, $from=array(), $until=array(), $query=array()) | |
Constructor. | |
addImage (Title $title, $sortkey, $pageLength, $isRedirect=false) | |
Add a page in the image namespace. | |
addPage ($title, $sortkey, $pageLength, $isRedirect=false) | |
Add a miscellaneous page. | |
addSubcategory (Title $title, $sortkey, $pageLength) | |
Add a subcategory to the internal lists, using a title object. | |
addSubcategoryObject (Category $cat, $sortkey, $pageLength) | |
Add a subcategory to the internal lists, using a Category object. | |
clearCategoryState () | |
doCategoryQuery () | |
finaliseCategoryState () | |
formatList ($articles, $articles_start_char, $cutoff=6) | |
Format a list of articles chunked by letter, either as a bullet list or a columnar format, depending on the length. | |
getCategoryBottom () | |
getCategoryTop () | |
getHTML () | |
Format the category data list. | |
getImageSection () | |
getPagesSection () | |
getSubcategorySection () | |
getSubcategorySortChar ($title, $sortkey) | |
Get the character to be used for sorting subcategories. | |
Static Public Member Functions | |
static | columnList ($articles, $articles_start_char) |
Format a list of articles chunked by letter in a three-column list, ordered vertically. | |
Public Attributes | |
$articles | |
$articles_start_char | |
$children | |
$children_start_char | |
Collation | $collation |
Array | $flip |
$from | |
ImageGallery | $gallery |
$imgsNoGallery | |
$imgsNoGallery_start_char | |
$imgsNoGalley | |
$limit | |
Array | $nextPage |
$showGallery | |
Title | $title |
$until | |
Private Member Functions | |
addFragmentToTitle ($title, $section) | |
Takes a title, and adds the fragment identifier that corresponds to the correct segment of the category. | |
getCountMessage ($rescnt, $dbcnt, $type) | |
What to do if the category table conflicts with the number of results returned? This function says what. | |
getSectionPagingLinks ($type) | |
Get the paging links for a section (subcats/pages/files), to go at the top and bottom of the output. | |
pagingLinks ($first, $last, $type= '') | |
Create paging links, as a helper method to getSectionPagingLinks(). | |
Static Private Member Functions | |
static | shortList ($articles, $articles_start_char) |
Format a list of articles chunked by letter in a bullet list. | |
Private Attributes | |
Category | $cat |
Category object for this page. | |
array | $query |
The original query array, to be used in generating paging links. |
Definition at line 23 of file CategoryViewer.php.
CategoryViewer::__construct | ( | $ | title, |
IContextSource $ | context, | ||
$ | from = array() , |
||
$ | until = array() , |
||
$ | query = array() |
||
) |
Constructor.
$title | Title | |
$context | IContextSource | |
array | $from | An array with keys page, subcat, and file for offset of results of each section (since 1.17) |
array | $until | An array with 3 keys for until of each section (since 1.17) |
$query | Array |
Definition at line 72 of file CategoryViewer.php.
CategoryViewer::addFragmentToTitle | ( | $ | title, |
$ | section | ||
) | [private] |
Takes a title, and adds the fragment identifier that corresponds to the correct segment of the category.
Title | $title,: | The title (usually $this->title) |
string | $section,: | Which section |
MWException |
Definition at line 628 of file CategoryViewer.php.
CategoryViewer::addImage | ( | Title $ | title, |
$ | sortkey, | ||
$ | pageLength, | ||
$ | isRedirect = false |
||
) |
Add a page in the image namespace.
$title | Title |
$sortkey | |
$pageLength | |
$isRedirect | bool |
Definition at line 218 of file CategoryViewer.php.
CategoryViewer::addPage | ( | $ | title, |
$ | sortkey, | ||
$ | pageLength, | ||
$ | isRedirect = false |
||
) |
Add a miscellaneous page.
$title | |
$sortkey | |
$pageLength | |
$isRedirect | bool |
Definition at line 248 of file CategoryViewer.php.
CategoryViewer::addSubcategory | ( | Title $ | title, |
$ | sortkey, | ||
$ | pageLength | ||
) |
Add a subcategory to the internal lists, using a title object.
Definition at line 181 of file CategoryViewer.php.
CategoryViewer::addSubcategoryObject | ( | Category $ | cat, |
$ | sortkey, | ||
$ | pageLength | ||
) |
Add a subcategory to the internal lists, using a Category object.
$cat | Category |
$sortkey | |
$pageLength |
Definition at line 160 of file CategoryViewer.php.
References $link, $title, Title\getText(), Category\getTitle(), Title\isRedirect(), and Linker\link().
Definition at line 131 of file CategoryViewer.php.
static CategoryViewer::columnList | ( | $ | articles, |
$ | articles_start_char | ||
) | [static] |
Format a list of articles chunked by letter in a three-column list, ordered vertically.
TODO: Take the headers into account when creating columns, so they're more visually equal.
More distant TODO: Scrap this and use CSS columns, whenever IE finally supports those.
$articles | Array |
$articles_start_char | Array |
Definition at line 508 of file CategoryViewer.php.
Definition at line 278 of file CategoryViewer.php.
Definition at line 263 of file CategoryViewer.php.
CategoryViewer::formatList | ( | $ | articles, |
$ | articles_start_char, | ||
$ | cutoff = 6 |
||
) |
Format a list of articles chunked by letter, either as a bullet list or a columnar format, depending on the length.
$articles | Array |
$articles_start_char | Array |
$cutoff | Int |
Definition at line 476 of file CategoryViewer.php.
Definition at line 462 of file CategoryViewer.php.
Definition at line 358 of file CategoryViewer.php.
CategoryViewer::getCountMessage | ( | $ | rescnt, |
$ | dbcnt, | ||
$ | type | ||
) | [private] |
What to do if the category table conflicts with the number of results returned? This function says what.
Each type is considered independently of the other types.
int | $rescnt | The number of items returned by our database query. |
int | $dbcnt | The number of items according to the category table. |
string | $type | 'subcat', 'article', or 'file' |
Definition at line 658 of file CategoryViewer.php.
Format the category data list.
Definition at line 90 of file CategoryViewer.php.
Definition at line 420 of file CategoryViewer.php.
Definition at line 391 of file CategoryViewer.php.
CategoryViewer::getSectionPagingLinks | ( | $ | type | ) | [private] |
Get the paging links for a section (subcats/pages/files), to go at the top and bottom of the output.
string | $type | 'page', 'subcat', or 'file' |
Definition at line 449 of file CategoryViewer.php.
Definition at line 368 of file CategoryViewer.php.
CategoryViewer::getSubcategorySortChar | ( | $ | title, |
$ | sortkey | ||
) |
Get the character to be used for sorting subcategories.
If there's a link from Category:A to Category:B, the sortkey of the resulting entry in the categorylinks table is Category:A, not A, which it SHOULD be. Workaround: If sortkey == "Category:".$title, than use $title for sorting, else use sortkey...
Title | $title | |
string | $sortkey | The human-readable sortkey (before transforming to icu or whatever). |
Definition at line 197 of file CategoryViewer.php.
CategoryViewer::pagingLinks | ( | $ | first, |
$ | last, | ||
$ | type = '' |
||
) | [private] |
Create paging links, as a helper method to getSectionPagingLinks().
string | $first | The 'until' parameter for the generated URL |
string | $last | The 'from' parameter for the generated URL |
string | $type | A prefix for parameters, 'page' or 'subcat' or 'file' |
Definition at line 587 of file CategoryViewer.php.
static CategoryViewer::shortList | ( | $ | articles, |
$ | articles_start_char | ||
) | [static, private] |
Format a list of articles chunked by letter in a bullet list.
$articles | Array |
$articles_start_char | Array |
Definition at line 564 of file CategoryViewer.php.
CategoryViewer::$articles |
Definition at line 24 of file CategoryViewer.php.
CategoryViewer::$articles_start_char |
Definition at line 24 of file CategoryViewer.php.
Category CategoryViewer::$cat [private] |
Category object for this page.
Definition at line 54 of file CategoryViewer.php.
CategoryViewer::$children |
Definition at line 24 of file CategoryViewer.php.
CategoryViewer::$children_start_char |
Definition at line 24 of file CategoryViewer.php.
Collation CategoryViewer::$collation |
Definition at line 45 of file CategoryViewer.php.
Array CategoryViewer::$flip |
Definition at line 37 of file CategoryViewer.php.
CategoryViewer::$from |
Definition at line 24 of file CategoryViewer.php.
ImageGallery CategoryViewer::$gallery |
Definition at line 49 of file CategoryViewer.php.
CategoryViewer::$imgsNoGallery |
Definition at line 24 of file CategoryViewer.php.
CategoryViewer::$imgsNoGallery_start_char |
Definition at line 24 of file CategoryViewer.php.
CategoryViewer::$imgsNoGalley |
Definition at line 24 of file CategoryViewer.php.
CategoryViewer::$limit |
Definition at line 24 of file CategoryViewer.php.
Array CategoryViewer::$nextPage |
Definition at line 33 of file CategoryViewer.php.
The original query array, to be used in generating paging links.
Definition at line 59 of file CategoryViewer.php.
CategoryViewer::$showGallery |
Definition at line 24 of file CategoryViewer.php.
Definition at line 41 of file CategoryViewer.php.
Referenced by addSubcategoryObject().
CategoryViewer::$until |
Definition at line 24 of file CategoryViewer.php.