Inherits MediaWiki\Context\ContextSource.
|
| | __construct (protected PageIdentity $page, IContextSource $context, array $from=[], array $until=[], private 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, string $sortkey, int $pageLength) |
| | Add a subcategory to the internal lists, using a Category object.
|
| |
| | getHTML () |
| | Format the category data list.
|
| |
| | 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 | 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.
|
| |
|
| array array< 'page'| 'subcat'| 'file',?string > | $prevPage = [] |
| |
Definition at line 36 of file CategoryViewer.php.
◆ __construct()
| MediaWiki\Category\CategoryViewer::__construct |
( |
protected PageIdentity | $page, |
|
|
IContextSource | $context, |
|
|
array | $from = [], |
|
|
array | $until = [], |
|
|
private array | $query = [] ) |
- Since
- 1.19 $context is a second, required parameter
- Parameters
-
| PageIdentity | $page | |
| IContextSource | $context | |
| array<'page'|'subcat'|'file',?string> | $from An array with keys page, subcat, and file for offset of results of each section (since 1.17) |
| array<'page'|'subcat'|'file',?string> | $until An array with 3 keys for until of each section (since 1.17) |
| array | $query | The original query array, to be used in generating paging links. |
Definition at line 86 of file CategoryViewer.php.
References MediaWiki\Category\CategoryViewer\$from, $request, MediaWiki\Category\CategoryViewer\$until, MediaWiki\MainConfigNames\CategoryPagingLimit, MediaWiki\Context\IContextSource\getConfig(), MediaWiki\Page\PageIdentity\getId(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Context\ContextSource\getOutput(), MediaWiki\Context\IContextSource\getRequest(), MediaWiki\Category\Category\newFromTitle(), and MediaWiki\Context\ContextSource\setContext().
◆ addImage()
| MediaWiki\Category\CategoryViewer::addImage |
( |
PageReference | $page, |
|
|
string | $sortkey, |
|
|
int | $pageLength, |
|
|
bool | $isRedirect = false ) |
Add a page in the image namespace.
- Parameters
-
| PageReference | $page | |
| string | $sortkey | |
| int | $pageLength | |
| bool | $isRedirect | |
Definition at line 301 of file CategoryViewer.php.
◆ addPage()
| MediaWiki\Category\CategoryViewer::addPage |
( |
PageReference | $page, |
|
|
string | $sortkey, |
|
|
int | $pageLength, |
|
|
bool | $isRedirect = false ) |
Add a miscellaneous page.
- Parameters
-
| PageReference | $page | |
| string | $sortkey | |
| int | $pageLength | |
| bool | $isRedirect | |
Definition at line 330 of file CategoryViewer.php.
◆ addSubcategoryObject()
| MediaWiki\Category\CategoryViewer::addSubcategoryObject |
( |
Category | $cat, |
|
|
string | $sortkey, |
|
|
int | $pageLength ) |
Add a subcategory to the internal lists, using a Category object.
- Parameters
-
| Category | $cat | |
| string | $sortkey | |
| int | $pageLength | |
Definition at line 210 of file CategoryViewer.php.
◆ clearCategoryState()
| MediaWiki\Category\CategoryViewer::clearCategoryState |
( |
| ) |
|
|
protected |
◆ columnList()
| static MediaWiki\Category\CategoryViewer::columnList |
( |
| $articles, |
|
|
| $articles_start_char, |
|
|
| $cssClasses = 'mw-category mw-category-columns' ) |
|
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.
- Parameters
-
| 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 |
- Returns
- string HTML to output
- Access: internal
Definition at line 686 of file CategoryViewer.php.
◆ doCategoryQuery()
| MediaWiki\Category\CategoryViewer::doCategoryQuery |
( |
| ) |
|
|
protected |
◆ finaliseCategoryState()
| MediaWiki\Category\CategoryViewer::finaliseCategoryState |
( |
| ) |
|
|
protected |
◆ getHTML()
| MediaWiki\Category\CategoryViewer::getHTML |
( |
| ) |
|
◆ getImageSection()
| MediaWiki\Category\CategoryViewer::getImageSection |
( |
| ) |
|
|
protected |
◆ getPagesSection()
| MediaWiki\Category\CategoryViewer::getPagesSection |
( |
| ) |
|
|
protected |
◆ getSubcategorySection()
| MediaWiki\Category\CategoryViewer::getSubcategorySection |
( |
| ) |
|
|
protected |
◆ shortList()
| static MediaWiki\Category\CategoryViewer::shortList |
( |
| $articles, |
|
|
| $articles_start_char ) |
|
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).
- Parameters
-
| string[] | $articles | HTML links to each article |
| string[] | $articles_start_char | The header characters for each article |
- Returns
- string HTML to output
- Access: internal
Definition at line 733 of file CategoryViewer.php.
◆ $articles
| array string [] MediaWiki\Category\CategoryViewer::$articles = [] |
◆ $articles_start_char
| array string [] MediaWiki\Category\CategoryViewer::$articles_start_char = [] |
◆ $children
| array string [] MediaWiki\Category\CategoryViewer::$children = [] |
◆ $children_start_char
| array string [] MediaWiki\Category\CategoryViewer::$children_start_char = [] |
◆ $collation
| readonly Collation MediaWiki\Category\CategoryViewer::$collation |
◆ $flip
| array array<'page'|'subcat'|'file',bool> MediaWiki\Category\CategoryViewer::$flip = [] |
◆ $from
| readonly array array<'page'|'subcat'|'file',?string> MediaWiki\Category\CategoryViewer::$from |
◆ $gallery
◆ $imgsNoGallery
| array string [] MediaWiki\Category\CategoryViewer::$imgsNoGallery = [] |
◆ $imgsNoGallery_start_char
| array string [] MediaWiki\Category\CategoryViewer::$imgsNoGallery_start_char = [] |
◆ $limit
| readonly int MediaWiki\Category\CategoryViewer::$limit |
◆ $nextPage
| array array<'page'|'subcat'|'file',?string> MediaWiki\Category\CategoryViewer::$nextPage = [] |
◆ $prevPage
| array array<'page'|'subcat'|'file',?string> MediaWiki\Category\CategoryViewer::$prevPage = [] |
|
protected |
◆ $showGallery
| bool MediaWiki\Category\CategoryViewer::$showGallery |
◆ $sortByTimestamp
| readonly bool MediaWiki\Category\CategoryViewer::$sortByTimestamp |
◆ $sortDescending
| readonly bool MediaWiki\Category\CategoryViewer::$sortDescending |
◆ $until
| readonly array array<'page'|'subcat'|'file',?string> MediaWiki\Category\CategoryViewer::$until |
The documentation for this class was generated from the following file: