MediaWiki
REL1_22
|
Table-based display with a user-selectable sort order. More...
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 |
TablePager::__construct | ( | IContextSource $ | context = null | ) |
Reimplemented from IndexPager.
Definition at line 919 of file Pager.php.
References ContextSource\$context, getDefaultSort(), getFieldNames(), ContextSource\getRequest(), isFieldSortable(), and ContextSource\setContext().
TablePager::formatRow | ( | $ | row | ) |
stdClass | $row |
Reimplemented from IndexPager.
Reimplemented in AllmessagesTablePager.
TablePager::formatValue | ( | $ | name, |
$ | value | ||
) | [abstract] |
Format a table cell.
The return value should be HTML, but use an empty string not   for empty cells. Do not include the
and .
The current result row is available as $this->mCurrentRow, in case you need more context.
string | $name | the database field name |
string | $value | the 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
string | $field | The column |
string | $value | The cell contents |
Reimplemented in AllmessagesTablePager.
TablePager::getDefaultSort | ( | ) | [abstract] |
The database field name used as a default sort order.
Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.
Referenced by __construct().
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.
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.
array | $blacklist | parameters from the request query which should not be resubmitted |
TablePager::getLimitSelect | ( | $ | attribs = array() | ) |
Get a list of items to show in a "<select>" element of limits.
This can be passed directly to XmlSelect::addOptions().
TablePager::getRowAttrs | ( | $ | row | ) |
TablePager::getRowClass | ( | $ | row | ) |
Reimplemented from IndexPager.
Reimplemented in AllmessagesTablePager.
TablePager::isFieldSortable | ( | $ | field | ) | [abstract] |
Return true if the named field should be sortable by the UI, false otherwise.
$field | String |
Reimplemented in AllmessagesTablePager, BlockListPager, and ImageListPager.
Referenced by __construct().