MediaWiki  REL1_22
TablePager Class Reference

Table-based display with a user-selectable sort order. More...

Inheritance diagram for TablePager:
Collaboration diagram for TablePager:

List of all members.

Public Member Functions

 __construct (IContextSource $context=null)
 formatRow ($row)
 formatValue ($name, $value)
 Format a table cell.
 getCellAttrs ($field, $value)
 Get any extra attributes to be applied to the given cell.
 getDefaultSort ()
 The database field name used as a default sort order.
 getEmptyBody ()
 getEndBody ()
 getFieldNames ()
 An array mapping database field names to a textual description of the field name, for use in the table header.
 getHiddenFields ($blacklist=array())
 Get <input type="hidden"> elements for use in a method="get" form.
 getIndexField ()
 getLimitDropdown ()
 Gets a limit selection dropdown.
 getLimitForm ()
 Get a form containing a limit selection dropdown.
 getLimitSelect ($attribs=array())
 Get a "<select>" element which has options for each of the allowed limits.
 getLimitSelectList ()
 Get a list of items to show in a "<select>" element of limits.
 getNavClass ()
 getNavigationBar ()
 A navigation bar with images.
 getRowAttrs ($row)
 Get attributes to be applied to the given row.
 getRowClass ($row)
 Get a class name to be applied to the given row.
 getSortHeaderClass ()
 getStartBody ()
 getTableClass ()
 isFieldSortable ($field)
 Return true if the named field should be sortable by the UI, false otherwise.

Public Attributes

 $mCurrentRow
 $mSort

Detailed Description

Table-based display with a user-selectable sort order.

Definition at line 915 of file Pager.php.


Constructor & Destructor Documentation


Member Function Documentation

Access:
protected
Parameters:
stdClass$row
Returns:
String HTML

Reimplemented from IndexPager.

Reimplemented in AllmessagesTablePager.

Definition at line 1018 of file Pager.php.

TablePager::formatValue ( name,
value 
) [abstract]

Format a table cell.

The return value should be HTML, but use an empty string not &#160; for empty cells. Do not include the

and .

The current result row is available as $this->mCurrentRow, in case you need more context.

Access:
protected
Parameters:
string$namethe database field name
string$valuethe value retrieved from the database

Reimplemented in ImageListPager, AllmessagesTablePager, and BlockListPager.

TablePager::getCellAttrs ( field,
value 
)

Get any extra attributes to be applied to the given cell.

Don't take this as an excuse to hardcode styles; use classes and CSS instead. Row context is available in $this->mCurrentRow

Access:
protected
Parameters:
string$fieldThe column
string$valueThe cell contents
Returns:
Array of attr => value

Reimplemented in AllmessagesTablePager.

Definition at line 1080 of file Pager.php.

The database field name used as a default sort order.

Access:
protected
Returns:
string

Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.

Referenced by __construct().

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Definition at line 1006 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Definition at line 998 of file Pager.php.

TablePager::getFieldNames ( ) [abstract]

An array mapping database field names to a textual description of the field name, for use in the table header.

The description should be plain text, it will be HTML-escaped later.

Returns:
Array

Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.

Referenced by __construct().

TablePager::getHiddenFields ( blacklist = array())

Get <input type="hidden"> elements for use in a method="get" form.

Resubmits all defined elements of the query string, except for a blacklist, passed in the $blacklist parameter.

Parameters:
array$blacklistparameters from the request query which should not be resubmitted
Returns:
String: HTML fragment

Definition at line 1227 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Reimplemented in BlockListPager.

Definition at line 1088 of file Pager.php.

Gets a limit selection dropdown.

Returns:
string

Definition at line 1263 of file Pager.php.

Get a form containing a limit selection dropdown.

Returns:
String: HTML fragment

Definition at line 1245 of file Pager.php.

TablePager::getLimitSelect ( attribs = array())

Get a "<select>" element which has options for each of the allowed limits.

Parameters:
$attribsString: Extra attributes to set
Returns:
String: HTML fragment

Definition at line 1179 of file Pager.php.

Get a list of items to show in a "<select>" element of limits.

This can be passed directly to XmlSelect::addOptions().

Since:
1.22
Returns:
array

Definition at line 1195 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented in ImageListPager.

Definition at line 1104 of file Pager.php.

A navigation bar with images.

Returns:
String HTML

Implements Pager.

Definition at line 1120 of file Pager.php.

Get attributes to be applied to the given row.

Access:
protected
Parameters:
$rowObject: the database result row
Returns:
Array of attribute => value

Definition at line 1059 of file Pager.php.

Get a class name to be applied to the given row.

Access:
protected
Parameters:
$rowObject: the database result row
Returns:
String

Definition at line 1047 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented in ImageListPager.

Definition at line 1112 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Reimplemented in AllmessagesTablePager.

Definition at line 943 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented in ImageListPager, and BlockListPager.

Definition at line 1096 of file Pager.php.

TablePager::isFieldSortable ( field) [abstract]

Return true if the named field should be sortable by the UI, false otherwise.

Parameters:
$fieldString

Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.

Referenced by __construct().


Member Data Documentation

TablePager::$mCurrentRow

Definition at line 917 of file Pager.php.

TablePager::$mSort

Definition at line 916 of file Pager.php.


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