CategoryPager Class Reference
[SpecialPagePager]

TODO: Allow sorting by count. More...

Inherits AlphabeticPager.

List of all members.

Public Member Functions

 __construct ($from)
 getQueryInfo ()
 This function should be overridden to provide all parameters needed for the main paged query.
 getIndexField ()
 This function should be overridden to return the name of the index fi- eld.
 getDefaultQuery ()
 Get an array of query parameters that should be put into self-links.
 getBody ()
 Get the formatted result list.
 formatRow ($result)
 Abstract formatting function.
 getStartForm ($from)

Protected Member Functions

 getDefaultDirections ()
 Return the default sorting direction: false for ascending, true for de- scending.


Detailed Description

TODO: Allow sorting by count.

We need to have a unique index to do this properly.

Definition at line 35 of file SpecialCategories.php.


Constructor & Destructor Documentation

CategoryPager::__construct ( from  ) 

Definition at line 36 of file SpecialCategories.php.

References IndexPager::__construct(), and Title::capitalize().


Member Function Documentation

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()

Reimplemented from IndexPager.

Definition at line 88 of file SpecialCategories.php.

References $result, $title, $wgLang, IndexPager::getSkin(), Title::makeTitle(), Xml::tags(), and wfMsgExt().

CategoryPager::getBody (  ) 

Get the formatted result list.

Calls getStartBody(), formatRow() and getEndBody(), concatenates the results and returns them.

Reimplemented from IndexPager.

Definition at line 75 of file SpecialCategories.php.

References 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 69 of file SpecialCategories.php.

CategoryPager::getDefaultQuery (  ) 

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 59 of file SpecialCategories.php.

CategoryPager::getIndexField (  ) 

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 54 of file SpecialCategories.php.

CategoryPager::getQueryInfo (  ) 

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 45 of file SpecialCategories.php.

CategoryPager::getStartForm ( from  ) 


The documentation for this class was generated from the following file:

Generated on Sat Apr 30 22:57:33 2011 for MediaWiki by  doxygen 1.5.9