MediaWiki
REL1_21
|
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 descending. |
TODO: Allow sorting by count.
We need to have a unique index to do this properly.
Definition at line 65 of file SpecialCategories.php.
CategoryPager::__construct | ( | IContextSource $ | context, |
$ | from | ||
) |
Definition at line 66 of file SpecialCategories.php.
References Title\capitalize(), IndexPager\setIncludeOffset(), and IndexPager\setOffset().
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 119 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 106 of file SpecialCategories.php.
References $batch, as, and Title\makeTitleSafe().
CategoryPager::getDefaultDirections | ( | ) | [protected] |
Return the default sorting direction: false for ascending, true for descending.
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 100 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 90 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 85 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 76 of file SpecialCategories.php.
References array().
CategoryPager::getStartForm | ( | $ | from | ) |
Definition at line 126 of file SpecialCategories.php.
References array(), Xml\fieldset(), ContextSource\getTitle(), global, Html\hidden(), Xml\inputLabel(), ContextSource\msg(), Xml\submitButton(), Xml\tags(), and text.