MediaWiki
REL1_19
|
TODO: Allow sorting by count. More...
Public Member Functions | |
__construct (IContextSource $context, $from) | |
formatRow ($result) | |
Abstract formatting function. | |
getBody () | |
Get the formatted result list. | |
getDefaultQuery () | |
Get an array of query parameters that should be put into self-links. | |
getIndexField () | |
This function should be overridden to return the name of the index fi- eld. | |
getQueryInfo () | |
This function should be overridden to provide all parameters needed for the main paged query. | |
getStartForm ($from) | |
Protected Member Functions | |
getDefaultDirections () | |
Return the default sorting direction: false for ascending, true for de- scending. | |
Private Attributes | |
$conds = array( 'cat_pages > 0' ) |
TODO: Allow sorting by count.
We need to have a unique index to do this properly.
Definition at line 61 of file SpecialCategories.php.
CategoryPager::__construct | ( | IContextSource $ | context, |
$ | from | ||
) |
Definition at line 64 of file SpecialCategories.php.
References $dbr, Title\capitalize(), IndexPager\setOffset(), and wfGetDB().
CategoryPager::formatRow | ( | $ | row | ) |
Abstract formatting function.
This should return an HTML string representing the result row $row. Rows will be concatenated and returned by getBody()
$row | Object: database row |
Reimplemented from IndexPager.
Definition at line 118 of file SpecialCategories.php.
References $count, $result, $title, ContextSource\getLanguage(), Linker\link(), Title\makeTitle(), ContextSource\msg(), and Xml\tags().
Get the formatted result list.
Calls getStartBody(), formatRow() and getEndBody(), concatenates the results and returns them.
Reimplemented from IndexPager.
Definition at line 105 of file SpecialCategories.php.
References LinkBatch\addObj(), and Title\makeTitleSafe().
CategoryPager::getDefaultDirections | ( | ) | [protected] |
Return the default sorting direction: false for ascending, true for de- scending.
You can also have an associative array of ordertype => dir, if multiple order types are supported. In this case getIndexField() must return an array, and the keys of that must exactly match the keys of this.
For backward compatibility, this method's return value will be ignored if $this->mDefaultDirection is already set when the constructor is called, for instance if it's statically initialized. In that case the value of that variable (which must be a boolean) will be used.
Note that despite its name, this does not return the value of the $this->mDefaultDirection member variable. That's the default for this particular instantiation, which is a single value. This is the set of all defaults for the class.
Reimplemented from IndexPager.
Definition at line 99 of file SpecialCategories.php.
Get an array of query parameters that should be put into self-links.
By default, all parameters passed in the URL are used, except for a short blacklist.
Reimplemented from IndexPager.
Definition at line 89 of file SpecialCategories.php.
This function should be overridden to return the name of the index fi- eld.
If the pager supports multiple orders, it may return an array of 'querykey' => 'indexfield' pairs, so that a request with &count=querykey will use indexfield to sort. In this case, the first returned key is the default.
Needless to say, it's really not a good idea to use a non-unique index for this! That won't page right.
Reimplemented from IndexPager.
Definition at line 84 of file SpecialCategories.php.
This function should be overridden to provide all parameters needed for the main paged query.
It returns an associative array with the following elements: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => option array join_conds => JOIN conditions
Reimplemented from IndexPager.
Definition at line 75 of file SpecialCategories.php.
CategoryPager::getStartForm | ( | $ | from | ) |
Definition at line 125 of file SpecialCategories.php.
References $wgScript, Xml\fieldset(), ContextSource\getTitle(), Html\hidden(), Xml\inputLabel(), ContextSource\msg(), Xml\submitButton(), and Xml\tags().
CategoryPager::$conds = array( 'cat_pages > 0' ) [private] |
Definition at line 62 of file SpecialCategories.php.