MediaWiki master
|
Inherits MediaWiki\Context\ContextSource.
Public Member Functions | |
__construct (PageIdentity $page, IContextSource $context, array $from=[], array $until=[], array $query=[]) | |
addImage (PageReference $page, string $sortkey, int $pageLength, bool $isRedirect=false) | |
Add a page in the image namespace. | |
addPage (PageReference $page, string $sortkey, int $pageLength, bool $isRedirect=false) | |
Add a miscellaneous page. | |
addSubcategoryObject (Category $cat, $sortkey, $pageLength) | |
Add a subcategory to the internal lists, using a Category object. | |
getHTML () | |
Format the category data list. | |
getSubcategorySortChar (PageIdentity $page, string $sortkey) | |
Get the character to be used for sorting subcategories. | |
Public Member Functions inherited from MediaWiki\Context\ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
getActionName () | |
Get the action name for the current web request. | |
getAuthority () | |
getConfig () | |
getContext () | |
Get the base IContextSource object. | |
getCsrfTokenSet () | |
Get a repository to obtain and match CSRF tokens. | |
getLanguage () | |
getLanguageCode () | |
getOutput () | |
getRequest () | |
getSkin () | |
getTiming () | |
getTitle () | |
getUser () | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key,... $params) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
setContext (IContextSource $context) | |
Static Public Member Functions | |
static | columnList ( $articles, $articles_start_char, $cssClasses='mw-category mw-category-columns') |
Format a list of articles chunked by letter in a three-column list, ordered vertically. | |
static | shortList ( $articles, $articles_start_char) |
Format a list of articles chunked by letter in a bullet list. | |
Public Attributes | |
string[] | $articles |
array | $articles_start_char |
array | $children |
array | $children_start_char |
Collation | $collation |
array | $flip |
array | $from |
ImageGalleryBase | $gallery |
array | $imgsNoGallery |
array | $imgsNoGallery_start_char |
int | $limit |
array | $nextPage |
bool | $showGallery |
array | $until |
Protected Member Functions | |
clearCategoryState () | |
doCategoryQuery () | |
finaliseCategoryState () | |
getCategoryBottom () | |
getCategoryTop () | |
getImageSection () | |
getPagesSection () | |
getSubcategorySection () | |
Protected Attributes | |
PageIdentity | $page |
array | $prevPage |
Definition at line 46 of file CategoryViewer.php.
MediaWiki\Category\CategoryViewer::__construct | ( | PageIdentity | $page, |
IContextSource | $context, | ||
array | $from = [], | ||
array | $until = [], | ||
array | $query = [] ) |
PageIdentity | $page | |
IContextSource | $context | |
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) |
array | $query |
Definition at line 116 of file CategoryViewer.php.
References MediaWiki\Category\CategoryViewer\$from, MediaWiki\Category\CategoryViewer\$page, MediaWiki\Category\CategoryViewer\$until, MediaWiki\MainConfigNames\CategoryPagingLimit, MediaWiki\Context\IContextSource\getConfig(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Context\ContextSource\getOutput(), MediaWiki\Category\Category\newFromTitle(), and MediaWiki\Context\ContextSource\setContext().
MediaWiki\Category\CategoryViewer::addImage | ( | PageReference | $page, |
string | $sortkey, | ||
int | $pageLength, | ||
bool | $isRedirect = false ) |
Add a page in the image namespace.
PageReference | $page | |
string | $sortkey | |
int | $pageLength | |
bool | $isRedirect |
Definition at line 315 of file CategoryViewer.php.
MediaWiki\Category\CategoryViewer::addPage | ( | PageReference | $page, |
string | $sortkey, | ||
int | $pageLength, | ||
bool | $isRedirect = false ) |
Add a miscellaneous page.
PageReference | $page | |
string | $sortkey | |
int | $pageLength | |
bool | $isRedirect |
Definition at line 342 of file CategoryViewer.php.
MediaWiki\Category\CategoryViewer::addSubcategoryObject | ( | Category | $cat, |
$sortkey, | |||
$pageLength ) |
Add a subcategory to the internal lists, using a Category object.
Category | $cat | |
string | $sortkey | |
int | $pageLength |
Definition at line 222 of file CategoryViewer.php.
References MediaWiki\Category\CategoryViewer\$page, MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Category\Category\getPage(), and MediaWiki\Category\CategoryViewer\getSubcategorySortChar().
|
protected |
Definition at line 194 of file CategoryViewer.php.
References ImageGalleryBase\factory(), MediaWiki\Context\ContextSource\getContext(), and MediaWiki\Context\ContextSource\getRequest().
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
static |
Format a list of articles chunked by letter in a three-column list, ordered vertically.
This is used for categories with a significant number of pages.
string[] | $articles | HTML links to each article |
string[] | $articles_start_char | The header characters for each article |
string | $cssClasses | CSS classes for the wrapper element |
Definition at line 665 of file CategoryViewer.php.
|
protected |
Definition at line 369 of file CategoryViewer.php.
References NS_CATEGORY, and NS_FILE.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
protected |
Definition at line 354 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
protected |
Definition at line 622 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
protected |
Definition at line 483 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
MediaWiki\Category\CategoryViewer::getHTML | ( | ) |
Format the category data list.
Definition at line 152 of file CategoryViewer.php.
References MediaWiki\MainConfigNames\CategoryMagicGallery, MediaWiki\Category\CategoryViewer\clearCategoryState(), MediaWiki\Category\CategoryViewer\doCategoryQuery(), MediaWiki\Category\CategoryViewer\finaliseCategoryState(), MediaWiki\Category\CategoryViewer\getCategoryBottom(), MediaWiki\Category\CategoryViewer\getCategoryTop(), MediaWiki\Context\ContextSource\getConfig(), MediaWiki\Category\CategoryViewer\getImageSection(), MediaWiki\Context\ContextSource\getLanguage(), MediaWiki\Context\ContextSource\getOutput(), MediaWiki\Category\CategoryViewer\getPagesSection(), MediaWiki\Category\CategoryViewer\getSubcategorySection(), and MediaWiki\Context\ContextSource\msg().
|
protected |
Definition at line 550 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
protected |
Definition at line 517 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
|
protected |
Definition at line 493 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\getHTML().
MediaWiki\Category\CategoryViewer::getSubcategorySortChar | ( | PageIdentity | $page, |
string | $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...
PageIdentity | $page | |
string | $sortkey | The human-readable sortkey (before transforming to icu or whatever). |
Definition at line 294 of file CategoryViewer.php.
References MediaWiki\Page\PageReference\getDBkey().
Referenced by MediaWiki\Category\CategoryViewer\addSubcategoryObject().
|
static |
Format a list of articles chunked by letter in a bullet list.
This is used for categories with a small number of pages (when columns aren't needed).
string[] | $articles | HTML links to each article |
string[] | $articles_start_char | The header characters for each article |
Definition at line 714 of file CategoryViewer.php.
string [] MediaWiki\Category\CategoryViewer::$articles |
Definition at line 60 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$articles_start_char |
Definition at line 63 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$children |
Definition at line 66 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$children_start_char |
Definition at line 69 of file CategoryViewer.php.
Collation MediaWiki\Category\CategoryViewer::$collation |
Definition at line 93 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$flip |
Definition at line 87 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$from |
Definition at line 54 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\__construct().
ImageGalleryBase MediaWiki\Category\CategoryViewer::$gallery |
Definition at line 96 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$imgsNoGallery |
Definition at line 78 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$imgsNoGallery_start_char |
Definition at line 75 of file CategoryViewer.php.
int MediaWiki\Category\CategoryViewer::$limit |
Definition at line 51 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$nextPage |
Definition at line 81 of file CategoryViewer.php.
|
protected |
Definition at line 90 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\__construct(), and MediaWiki\Category\CategoryViewer\addSubcategoryObject().
|
protected |
Definition at line 84 of file CategoryViewer.php.
bool MediaWiki\Category\CategoryViewer::$showGallery |
Definition at line 72 of file CategoryViewer.php.
array MediaWiki\Category\CategoryViewer::$until |
Definition at line 57 of file CategoryViewer.php.
Referenced by MediaWiki\Category\CategoryViewer\__construct().