[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/pager/ -> TablePager.php (summary)

Efficient paging for SQL queries. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 469 lines (13 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 22 functions

  __construct()
  getBody()
  getBodyOutput()
  getFullOutput()
  getStartBody()
  getEndBody()
  getEmptyBody()
  formatRow()
  getRowClass()
  getRowAttrs()
  getCellAttrs()
  getIndexField()
  getTableClass()
  getNavClass()
  getSortHeaderClass()
  getNavigationBar()
  getModuleStyles()
  getLimitSelect()
  getLimitSelectList()
  getHiddenFields()
  getLimitForm()
  getLimitDropdown()

Functions
Functions that are not part of a class:

__construct( IContextSource $context = null )   X-Ref
No description

getBody()   X-Ref
Get the formatted result list. Calls getStartBody(), formatRow() and getEndBody(), concatenates
the results and returns them.

Also adds the required styles to our OutputPage object (this means that if context wasn't
passed to constructor or otherwise set up, you will get a pager with missing styles).

This method has been made 'final' in 1.24. There's no reason to override it, and if there exist
any subclasses that do, the style loading hack is probably broken in them. Let's fail fast
rather than mysteriously render things wrong.

return: string

getBodyOutput()   X-Ref
Get the formatted result list.

Calls getBody() and getModuleStyles() and builds a ParserOutput object. (This is a bit hacky
but works well.)

return: ParserOutput

getFullOutput()   X-Ref
Get the formatted result list, with navigation bars.

Calls getBody(), getNavigationBar() and getModuleStyles() and
builds a ParserOutput object. (This is a bit hacky but works well.)

return: ParserOutput

getStartBody()   X-Ref

return: string

getEndBody()   X-Ref

return: string

getEmptyBody()   X-Ref

return: string

formatRow( $row )   X-Ref

param: stdClass $row
return: string HTML

getRowClass( $row )   X-Ref
Get a class name to be applied to the given row.

param: object $row The database result row
return: string

getRowAttrs( $row )   X-Ref
Get attributes to be applied to the given row.

param: object $row The database result row
return: array Array of attribute => value

getCellAttrs( $field, $value )   X-Ref
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

param: string $field The column
param: string $value The cell contents
return: array Array of attr => value

getIndexField()   X-Ref

return: string

getTableClass()   X-Ref

return: string

getNavClass()   X-Ref

return: string

getSortHeaderClass()   X-Ref

return: string

getNavigationBar()   X-Ref
A navigation bar with images

return: string HTML

getModuleStyles()   X-Ref
ResourceLoader modules that must be loaded to provide correct styling for this pager

return: string[]

getLimitSelect( $attribs = array()   X-Ref
Get a "<select>" element which has options for each of the allowed limits

param: string $attribs Extra attributes to set
return: string HTML fragment

getLimitSelectList()   X-Ref
Get a list of items to show in a "<select>" element of limits.
This can be passed directly to XmlSelect::addOptions().

return: array

getHiddenFields( $blacklist = array()   X-Ref
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.

param: array $blacklist Parameters from the request query which should not be resubmitted
return: string HTML fragment

getLimitForm()   X-Ref
Get a form containing a limit selection dropdown

return: string HTML fragment

getLimitDropdown()   X-Ref
Gets a limit selection dropdown

return: string



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1