Inherits IndexPager.
Inherited by AllmessagesTablePager, and ImageListPager.
Public Member Functions | |
__construct () | |
getStartBody () | |
Hook into getBody(), allows text to be inserted at the start. | |
getEndBody () | |
Hook into getBody() for the end of the list. | |
getEmptyBody () | |
Hook into getBody(), for the bit between the start and the end when there are no rows. | |
formatRow ($row) | |
Abstract formatting function. | |
getRowClass ($row) | |
Get a class name to be applied to the given row. | |
getRowAttrs ($row) | |
Get attributes to be applied to the given row. | |
getCellAttrs ($field, $value) | |
Get any extra attributes to be applied to the given cell. | |
getIndexField () | |
This function should be overridden to return the name of the index fi- eld. | |
getTableClass () | |
getNavClass () | |
getSortHeaderClass () | |
getNavigationBar () | |
A navigation bar with images. | |
getLimitSelect () | |
Get a <select> element which has options for each of the allowed limits. | |
getHiddenFields ($blacklist=array()) | |
Get <input type="hidden"> elements for use in a method="get" form. | |
getLimitForm () | |
Get a form containing a limit selection dropdown. | |
isFieldSortable ($field) | |
Return true if the named field should be sortable by the UI, false otherwise. | |
formatValue ($name, $value) | |
Format a table cell. | |
getDefaultSort () | |
The database field name used as a default sort order. | |
getFieldNames () | |
An array mapping database field names to a textual description of the field name, for use in the table header. | |
Public Attributes | |
$mSort | |
$mCurrentRow |
Definition at line 746 of file Pager.php.
TablePager::__construct | ( | ) |
Reimplemented from IndexPager.
Reimplemented in ImageListPager.
Definition at line 750 of file Pager.php.
References $wgRequest, getDefaultSort(), and getFieldNames().
Referenced by AllmessagesTablePager::__construct().
TablePager::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.
Reimplemented in AllmessagesTablePager.
Definition at line 821 of file Pager.php.
References $name, $s, formatValue(), getCellAttrs(), getFieldNames(), getRowAttrs(), Xml::openElement(), and Xml::tags().
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 AllmessagesTablePager, and ImageListPager.
Referenced by formatRow().
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
$field | The column | |
$value | The cell contents |
Reimplemented in AllmessagesTablePager.
Definition at line 862 of file Pager.php.
Referenced by formatRow().
TablePager::getDefaultSort | ( | ) | [abstract] |
The database field name used as a default sort order.
Reimplemented in AllmessagesTablePager, and ImageListPager.
Referenced by __construct().
TablePager::getEmptyBody | ( | ) |
Hook into getBody(), for the bit between the start and the end when there are no rows.
Reimplemented from IndexPager.
Definition at line 815 of file Pager.php.
References getFieldNames(), and wfMsgHtml().
TablePager::getEndBody | ( | ) |
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, and ImageListPager.
Referenced by __construct(), formatRow(), getEmptyBody(), and getStartBody().
TablePager::getHiddenFields | ( | $ | blacklist = array() |
) |
Get <input type="hidden"> elements for use in a method="get" form.
Resubmits all defined elements of the $_GET array, except for a blacklist, passed in the $blacklist parameter.
Definition at line 963 of file Pager.php.
Referenced by ImageListPager::getForm(), and getLimitForm().
TablePager::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.
TablePager::getLimitForm | ( | ) |
Get a form containing a limit selection dropdown.
Definition at line 981 of file Pager.php.
References $wgScript, getHiddenFields(), getLimitSelect(), Xml::openElement(), and wfMsgHtml().
TablePager::getLimitSelect | ( | ) |
Get a <select> element which has options for each of the allowed limits.
Definition at line 937 of file Pager.php.
Referenced by ImageListPager::getForm(), and getLimitForm().
TablePager::getNavClass | ( | ) |
Reimplemented in ImageListPager.
Definition at line 874 of file Pager.php.
Referenced by getNavigationBar().
TablePager::getNavigationBar | ( | ) |
A navigation bar with images.
Implements Pager.
Definition at line 885 of file Pager.php.
References $keys, $path, $s, $wgContLang, $wgStylePath, getNavClass(), IndexPager::getPagingLinks(), IndexPager::isNavigationBarShown(), and wfMsgHtml().
TablePager::getRowAttrs | ( | $ | row | ) |
Get attributes to be applied to the given row.
object | $row The database result row |
Definition at line 850 of file Pager.php.
References getRowClass().
Referenced by formatRow().
TablePager::getRowClass | ( | $ | row | ) |
Get a class name to be applied to the given row.
object | $row The database result row |
Definition at line 841 of file Pager.php.
Referenced by getRowAttrs().
TablePager::getSortHeaderClass | ( | ) |
Reimplemented in ImageListPager.
Definition at line 878 of file Pager.php.
Referenced by getStartBody().
TablePager::getStartBody | ( | ) |
Hook into getBody(), allows text to be inserted at the start.
This will be called even if there are no rows in the result set.
Reimplemented from IndexPager.
Reimplemented in AllmessagesTablePager, and ImageListPager.
Definition at line 765 of file Pager.php.
References $name, $s, $wgStylePath, getFieldNames(), getSortHeaderClass(), getTableClass(), isFieldSortable(), IndexPager::makeLink(), and wfMsg().
TablePager::getTableClass | ( | ) |
Reimplemented in ImageListPager.
Definition at line 870 of file Pager.php.
Referenced by getStartBody().
TablePager::isFieldSortable | ( | $ | field | ) | [abstract] |
Return true if the named field should be sortable by the UI, false otherwise.
string | $field |
Reimplemented in AllmessagesTablePager, and ImageListPager.
Referenced by getStartBody().