MediaWiki  REL1_19
AllmessagesTablePager Class Reference

Use TablePager for prettified output. More...

Inheritance diagram for AllmessagesTablePager:
Collaboration diagram for AllmessagesTablePager:

List of all members.

Public Member Functions

 __construct ($page, $conds, $langObj=null)
 buildForm ()
 formatRow ($row)
 formatValue ($field, $value)
 Format a table cell.
 getAllMessages ($descending)
 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.
 getFieldNames ()
 An array mapping database field names to a textual description of the field name, for use in the table header.
 getQueryInfo ()
 This function should be overridden to provide all parameters needed for the main paged query.
 getRowAttrs ($row, $isSecond=false)
 getStartBody ()
 Hook into getBody(), allows text to be inserted at the start.
 getTitle ()
 Get the Title object.
 isFieldSortable ($x)
 Return true if the named field should be sortable by the UI, false otherwise.
 reallyDoQuery ($offset, $limit, $descending)
 This function normally does a database query to get the results; we need to make a pretend result using a FakeResultWrapper.

Static Public Member Functions

static getCustomisedStatuses ($messageNames, $langcode= 'en', $foreign=false)
 Determine which of the MediaWiki and MediaWiki_talk namespace pages exist.

Public Attributes

 $custom
 $displayPrefix
 $lang
 $langcode
 $mLimitsShown
 $prefix

Protected Attributes

 $filter

Detailed Description

Use TablePager for prettified output.

We have to pretend that we're getting data from a table when in fact not all of it comes from the database.

Definition at line 86 of file SpecialAllmessages.php.


Constructor & Destructor Documentation

AllmessagesTablePager::__construct ( page,
conds,
langObj = null 
)

Definition at line 102 of file SpecialAllmessages.php.

References $page, $prefix, $wgContLang, ContextSource\getLanguage(), ContextSource\getRequest(), Title\makeTitleSafe(), and ContextSource\msg().

Here is the call graph for this function:


Member Function Documentation

Parameters:
$rowArray
Returns:
String HTML

Reimplemented from TablePager.

Definition at line 381 of file SpecialAllmessages.php.

References formatValue(), getCellAttrs(), getRowAttrs(), Xml\openElement(), and Xml\tags().

Here is the call graph for this function:

AllmessagesTablePager::formatValue ( name,
value 
)

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.

Parameters:
$nameString: the database field name
$valueString: the value retrieved from the database

Reimplemented from TablePager.

Definition at line 342 of file SpecialAllmessages.php.

References $title, Sanitizer\escapeHtmlAllowEntities(), ContextSource\getLanguage(), Linker\link(), Linker\linkKnown(), and Title\makeTitle().

Referenced by formatRow().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 225 of file SpecialAllmessages.php.

References Language\getLocalisationCache(), wfProfileIn(), and wfProfileOut().

Referenced by reallyDoQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

AllmessagesTablePager::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

Parameters:
$fieldString The column
$valueString The cell contents
Returns:
Array of attr => value

Reimplemented from TablePager.

Definition at line 409 of file SpecialAllmessages.php.

Referenced by formatRow().

Here is the caller graph for this function:

static AllmessagesTablePager::getCustomisedStatuses ( messageNames,
langcode = 'en',
foreign = false 
) [static]

Determine which of the MediaWiki and MediaWiki_talk namespace pages exist.

Returns array( 'pages' => ..., 'talks' => ... ), where the subarrays have an entry for each existing page, with the key being the message name and value arbitrary.

Parameters:
array$messageNames
string$langcodeWhat language code
bool$foreignWhether the $langcode is not the content language
Returns:
array: a 'pages' and 'talks' array with the keys of existing pages

Definition at line 252 of file SpecialAllmessages.php.

References $dbr, $langcode, $res, $title, wfGetDB(), wfProfileIn(), and wfProfileOut().

Referenced by ApiQueryAllmessages\execute(), and reallyDoQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

The database field name used as a default sort order.

Reimplemented from TablePager.

Definition at line 435 of file SpecialAllmessages.php.

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 from TablePager.

Definition at line 420 of file SpecialAllmessages.php.

References ContextSource\msg().

Here is the call graph for this function:

This function should be overridden to provide all parameters needed for the main paged query.

It returns an associative array with the following elements: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => option array join_conds => JOIN conditions

Returns:
Array

Reimplemented from IndexPager.

Definition at line 439 of file SpecialAllmessages.php.

AllmessagesTablePager::getRowAttrs ( row,
isSecond = false 
)

Definition at line 398 of file SpecialAllmessages.php.

References Sanitizer\escapeId(), and ContextSource\getLanguage().

Referenced by formatRow().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
String

Reimplemented from TablePager.

Definition at line 325 of file SpecialAllmessages.php.

References ContextSource\msg(), and Xml\openElement().

Here is the call graph for this function:

Get the Title object.

Since:
1.18
Returns:
Title

Reimplemented from ContextSource.

Definition at line 427 of file SpecialAllmessages.php.

References SpecialPage\getTitleFor().

Referenced by buildForm().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Parameters:
$fieldString

Reimplemented from TablePager.

Definition at line 431 of file SpecialAllmessages.php.

AllmessagesTablePager::reallyDoQuery ( offset,
limit,
descending 
)

This function normally does a database query to get the results; we need to make a pretend result using a FakeResultWrapper.

Reimplemented from IndexPager.

Definition at line 294 of file SpecialAllmessages.php.

References $count, $limit, $result, getAllMessages(), getCustomisedStatuses(), and wfMessage().

Here is the call graph for this function:


Member Data Documentation

AllmessagesTablePager::$custom

Definition at line 100 of file SpecialAllmessages.php.

AllmessagesTablePager::$displayPrefix

Definition at line 88 of file SpecialAllmessages.php.

AllmessagesTablePager::$filter [protected]

Definition at line 88 of file SpecialAllmessages.php.

AllmessagesTablePager::$lang

Definition at line 95 of file SpecialAllmessages.php.

Referenced by buildForm().

AllmessagesTablePager::$langcode

Definition at line 88 of file SpecialAllmessages.php.

Referenced by getCustomisedStatuses().

AllmessagesTablePager::$mLimitsShown

Reimplemented from IndexPager.

Definition at line 90 of file SpecialAllmessages.php.

AllmessagesTablePager::$prefix

Definition at line 88 of file SpecialAllmessages.php.

Referenced by __construct().


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