MediaWiki  REL1_20
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 ()
 Get a "<select>" element which has options for each of the allowed 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 898 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 993 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:
$nameString: the database field name
$valueString: the value retrieved from the database

Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.

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:
$fieldString The column
$valueString The cell contents
Returns:
Array of attr => value

Reimplemented in AllmessagesTablePager.

Definition at line 1055 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 982 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Definition at line 974 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:
$blacklistArray parameters from the request query which should not be resubmitted
Returns:
String: HTML fragment

Definition at line 1184 of file Pager.php.

Referenced by ImageListPager\getForm().

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Reimplemented in BlockListPager.

Definition at line 1063 of file Pager.php.

Gets a limit selection dropdown.

Returns:
string

Definition at line 1220 of file Pager.php.

Get a form containing a limit selection dropdown.

Returns:
String: HTML fragment

Definition at line 1204 of file Pager.php.

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

Returns:
String: HTML fragment

Definition at line 1151 of file Pager.php.

Referenced by ImageListPager\getForm().

Access:
protected
Returns:
string

Reimplemented in ImageListPager.

Definition at line 1079 of file Pager.php.

A navigation bar with images.

Returns:
String HTML

Implements Pager.

Definition at line 1095 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 1034 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 1022 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented in ImageListPager.

Definition at line 1087 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented from IndexPager.

Reimplemented in AllmessagesTablePager.

Definition at line 924 of file Pager.php.

Access:
protected
Returns:
string

Reimplemented in BlockListPager, and ImageListPager.

Definition at line 1071 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.


Member Data Documentation

TablePager::$mCurrentRow

Definition at line 900 of file Pager.php.

TablePager::$mSort

Definition at line 899 of file Pager.php.


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