| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 743 lines (23 kb) |
| Included or required: | 0 times |
| Referenced: | 1 time |
| Includes or requires: | 0 files |
CategoryViewer:: (21 methods):
__construct()
getHTML()
clearCategoryState()
addSubcategoryObject()
getSubcategorySortChar()
addImage()
addPage()
finaliseCategoryState()
doCategoryQuery()
getCategoryTop()
getSubcategorySection()
getPagesSection()
getImageSection()
getSectionPagingLinks()
getCategoryBottom()
formatList()
columnList()
shortList()
pagingLinks()
addFragmentToTitle()
getCountMessage()
Class: CategoryViewer - X-Ref
List and paging of category members.| __construct( $title, IContextSource $context, $from = array() X-Ref |
param: Title $title param: IContextSource $context param: array $from An array with keys page, subcat, param: array $until An array with 3 keys for until of each section (since 1.17) param: array $query |
| getHTML() X-Ref |
| Format the category data list. return: string HTML output |
| clearCategoryState() X-Ref |
| No description |
| addSubcategoryObject( Category $cat, $sortkey, $pageLength ) X-Ref |
| Add a subcategory to the internal lists, using a Category object param: Category $cat param: string $sortkey param: int $pageLength |
| getSubcategorySortChar( $title, $sortkey ) X-Ref |
| 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... param: Title $title param: string $sortkey The human-readable sortkey (before transforming to icu or whatever). return: string |
| addImage( Title $title, $sortkey, $pageLength, $isRedirect = false ) X-Ref |
| Add a page in the image namespace param: Title $title param: string $sortkey param: int $pageLength param: bool $isRedirect |
| addPage( $title, $sortkey, $pageLength, $isRedirect = false ) X-Ref |
| Add a miscellaneous page param: Title $title param: string $sortkey param: int $pageLength param: bool $isRedirect |
| finaliseCategoryState() X-Ref |
| No description |
| doCategoryQuery() X-Ref |
| No description |
| getCategoryTop() X-Ref |
return: string |
| getSubcategorySection() X-Ref |
return: string |
| getPagesSection() X-Ref |
return: string |
| getImageSection() X-Ref |
return: string |
| getSectionPagingLinks( $type ) X-Ref |
| Get the paging links for a section (subcats/pages/files), to go at the top and bottom of the output. param: string $type 'page', 'subcat', or 'file' return: string HTML output, possibly empty if there are no other pages |
| getCategoryBottom() X-Ref |
return: string |
| formatList( $articles, $articles_start_char, $cutoff = 6 ) X-Ref |
| Format a list of articles chunked by letter, either as a bullet list or a columnar format, depending on the length. param: array $articles param: array $articles_start_char param: int $cutoff return: string |
| columnList( $articles, $articles_start_char ) X-Ref |
| 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. param: array $articles param: string[] $articles_start_char return: string |
| shortList( $articles, $articles_start_char ) X-Ref |
| Format a list of articles chunked by letter in a bullet list. param: array $articles param: string[] $articles_start_char return: string |
| pagingLinks( $first, $last, $type = '' ) X-Ref |
| Create paging links, as a helper method to getSectionPagingLinks(). param: string $first The 'until' parameter for the generated URL param: string $last The 'from' parameter for the generated URL param: string $type A prefix for parameters, 'page' or 'subcat' or return: string HTML |
| addFragmentToTitle( $title, $section ) X-Ref |
| Takes a title, and adds the fragment identifier that corresponds to the correct segment of the category. param: Title $title The title (usually $this->title) param: string $section Which section return: Title |
| getCountMessage( $rescnt, $dbcnt, $type ) X-Ref |
| 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. param: int $rescnt The number of items returned by our database query. param: int $dbcnt The number of items according to the category table. param: string $type 'subcat', 'article', or 'file' return: string A message giving the number of items, to output to HTML. |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |