MediaWiki  REL1_24
ChangesListSpecialPage Class Reference

Special page which uses a ChangesList to show query results. More...

Inheritance diagram for ChangesListSpecialPage:
Collaboration diagram for ChangesListSpecialPage:

List of all members.

Public Member Functions

 buildMainQueryConds (FormOptions $opts)
 Return an array of conditions depending of options set in $opts.
 doHeader ($opts, $numRows)
 Set the text to be displayed above the changes.
 doMainQuery ($conds, $opts)
 Process the query.
 execute ($subpage)
 Main execution point.
 getDefaultOptions ()
 Get a FormOptions object containing the default options.
 getExtraOptions ($opts)
 Get options to be displayed in a form.
 getOptions ()
 Get the current FormOptions for this request.
 getRows ()
 Get the database result for this special page instance.
 outputChangesList ($rows, $opts)
 Build and output the actual changes list.
 outputFeedLinks ()
 Output feed links.
 parseParameters ($par, FormOptions $opts)
 Process $par and put options found in $opts.
 setBottomText (FormOptions $opts)
 Send the text to be displayed after the options.
 setTopText (FormOptions $opts)
 Send the text to be displayed before the options.
 setup ($parameters)
 Create a FormOptions object with options as specified by the user.
 validateOptions (FormOptions $opts)
 Validate a FormOptions object generated by getDefaultOptions() with values already populated.
 webOutput ($rows, $opts)
 Send output to the OutputPage object, only called if not used feeds.

Static Public Member Functions

static makeLegend (IContextSource $context)
 Return the legend displayed within the fieldset.

Protected Member Functions

 addModules ()
 Add page-specific modules.
 fetchOptionsFromRequest ($opts)
 Fetch values for a FormOptions object from the WebRequest associated with this instance.
 getCustomFilters ()
 Get custom show/hide filters.
 getDB ()
 Return a DatabaseBase object for reading.
 getGroupName ()
 Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
 runMainQueryHook (&$tables, &$fields, &$conds, &$query_options, &$join_conds, $opts)

Protected Attributes

array $customFilters
 *
FormOptions $rcOptions
 *
string $rcSubpage
 *

Detailed Description

Special page which uses a ChangesList to show query results.

Todo:
Way too many public functions, most of them should be protected

Definition at line 30 of file ChangesListSpecialPage.php.


Member Function Documentation

Add page-specific modules.

Reimplemented in SpecialRecentChanges.

Definition at line 455 of file ChangesListSpecialPage.php.

Return an array of conditions depending of options set in $opts.

Parameters:
FormOptions$opts
Returns:
array

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Definition at line 199 of file ChangesListSpecialPage.php.

ChangesListSpecialPage::doHeader ( opts,
numRows 
)

Set the text to be displayed above the changes.

Parameters:
FormOptions$opts
int$numRowsNumber of rows in the result to show after this header

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Definition at line 361 of file ChangesListSpecialPage.php.

ChangesListSpecialPage::doMainQuery ( conds,
opts 
)

Process the query.

Parameters:
array$conds
FormOptions$opts
Returns:
bool|ResultWrapper Result or false

Reimplemented in SpecialWatchlist, SpecialRecentChanges, and SpecialRecentChangesLinked.

Definition at line 276 of file ChangesListSpecialPage.php.

Main execution point.

Parameters:
string$subpage

Reimplemented from SpecialPage.

Reimplemented in SpecialRecentChanges, and SpecialWatchlist.

Definition at line 42 of file ChangesListSpecialPage.php.

Fetch values for a FormOptions object from the WebRequest associated with this instance.

Intended for subclassing, e.g. to add a backwards-compatibility layer.

Parameters:
FormOptions$opts
Returns:
FormOptions

Reimplemented in SpecialWatchlist.

Definition at line 168 of file ChangesListSpecialPage.php.

Get custom show/hide filters.

Returns:
array Map of filter URL param names to properties (msg/default)

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Definition at line 151 of file ChangesListSpecialPage.php.

Get a FormOptions object containing the default options.

By default returns some basic options, you might want to not call parent method and discard them, or to override default values.

Returns:
FormOptions

Reimplemented in SpecialWatchlist, SpecialRecentChanges, and SpecialRecentChangesLinked.

Definition at line 129 of file ChangesListSpecialPage.php.

Get options to be displayed in a form.

Todo:
This should handle options returned by getDefaultOptions().
Todo:
Not called by anything, should be called by something… doHeader() maybe?
Parameters:
FormOptions$opts
Returns:
array

Reimplemented in SpecialRecentChanges, and SpecialRecentChangesLinked.

Definition at line 397 of file ChangesListSpecialPage.php.

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 462 of file ChangesListSpecialPage.php.

Get the current FormOptions for this request.

Returns:
FormOptions

Definition at line 90 of file ChangesListSpecialPage.php.

Referenced by SpecialWatchlist\execute(), and SpecialRecentChanges\getFeedQuery().

Get the database result for this special page instance.

Used by ApiFeedRecentChanges.

Returns:
bool|ResultWrapper Result or false

Definition at line 78 of file ChangesListSpecialPage.php.

static ChangesListSpecialPage::makeLegend ( IContextSource context) [static]

Return the legend displayed within the fieldset.

Todo:

This should not be static, then we can drop the parameter

Not called by anything, should be called by doHeader()

Parameters:
IContextSource$contextThe object available as $this in non-static functions
Returns:
string

Definition at line 409 of file ChangesListSpecialPage.php.

Referenced by SpecialRecentChanges\doHeader(), and SpecialWatchlist\setTopText().

ChangesListSpecialPage::outputChangesList ( rows,
opts 
) [abstract]

Build and output the actual changes list.

Parameters:
array$rowsDatabase rows
FormOptions$opts

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Output feed links.

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Definition at line 343 of file ChangesListSpecialPage.php.

Process $par and put options found in $opts.

Used when including the page.

Parameters:
string$par
FormOptions$opts

Reimplemented in SpecialRecentChanges, and SpecialRecentChangesLinked.

Definition at line 180 of file ChangesListSpecialPage.php.

ChangesListSpecialPage::runMainQueryHook ( &$  tables,
&$  fields,
&$  conds,
&$  query_options,
&$  join_conds,
opts 
) [protected]

Reimplemented in SpecialWatchlist, and SpecialRecentChanges.

Definition at line 309 of file ChangesListSpecialPage.php.

Send the text to be displayed after the options.

Should use $this->getOutput()->addWikiText() or similar methods to print the text.

Parameters:
FormOptions$opts

Definition at line 385 of file ChangesListSpecialPage.php.

Referenced by SpecialRecentChanges\doHeader(), and SpecialWatchlist\doHeader().

Send the text to be displayed before the options.

Should use $this->getOutput()->addWikiText() or similar methods to print the text.

Parameters:
FormOptions$opts

Reimplemented in SpecialWatchlist, SpecialRecentChanges, and SpecialRecentChangesLinked.

Definition at line 375 of file ChangesListSpecialPage.php.

ChangesListSpecialPage::setup ( parameters)

Create a FormOptions object with options as specified by the user.

Parameters:
array$parameters
Returns:
FormOptions

Definition at line 105 of file ChangesListSpecialPage.php.

Validate a FormOptions object generated by getDefaultOptions() with values already populated.

Parameters:
FormOptions$opts

Reimplemented in SpecialRecentChanges.

Definition at line 189 of file ChangesListSpecialPage.php.

ChangesListSpecialPage::webOutput ( rows,
opts 
)

Send output to the OutputPage object, only called if not used feeds.

Parameters:
ResultWrapper$rowsDatabase rows
FormOptions$opts

Definition at line 331 of file ChangesListSpecialPage.php.


Member Data Documentation

array ChangesListSpecialPage::$customFilters [protected]

*

Definition at line 35 of file ChangesListSpecialPage.php.

FormOptions ChangesListSpecialPage::$rcOptions [protected]

*

Definition at line 33 of file ChangesListSpecialPage.php.

string ChangesListSpecialPage::$rcSubpage [protected]

*

Definition at line 31 of file ChangesListSpecialPage.php.


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