MediaWiki  REL1_22
InfoAction Class Reference

Displays information about a page. More...

Inheritance diagram for InfoAction:
Collaboration diagram for InfoAction:

List of all members.

Public Member Functions

 getName ()
 Returns the name of the action this object responds to.
 onView ()
 Shows page information on GET request.
 requiresUnblock ()
 Whether this action can still be executed by a blocked user.
 requiresWrite ()
 Whether this action requires the wiki not to be locked.

Static Public Member Functions

static invalidateCache (Title $title)
 Clear the info cache for a given Title.

Public Attributes

const CACHE_VERSION = '2013-03-17'

Protected Member Functions

 addRow ($table, $name, $value, $id)
 Adds a row to a table that will be added to the content.
 addTable ($content, $table)
 Adds a table to the content that will be added to the output.
 getContributors ()
 Get a list of contributors of $article.
 getDescription ()
 Returns the description that goes below the "<h1>" tag.
 getPageTitle ()
 Returns the name that goes in the "<h1>" page title.
 makeHeader ($header)
 Creates a header that can be added to the output.
 pageInfo ()
 Returns page information in an easily-manipulated format.

Static Protected Member Functions

static pageCounts (Title $title)
 Returns page counts that would be too "expensive" to retrieve by normal means.

Detailed Description

Displays information about a page.

Definition at line 30 of file InfoAction.php.


Member Function Documentation

InfoAction::addRow ( table,
name,
value,
id 
) [protected]

Adds a row to a table that will be added to the content.

Parameters:
string$tableThe table that will be added to the content
string$nameThe name of the row
string$valueThe value of the row
string$idThe ID to use for the 'tr' element
Returns:
string The table with the row added

Definition at line 168 of file InfoAction.php.

References $name, $value, array(), and Html\rawElement().

Referenced by onView().

InfoAction::addTable ( content,
table 
) [protected]

Adds a table to the content that will be added to the output.

Parameters:
string$contentThe content that will be added to the output
string$tableThe table
Returns:
string The content with the table added

Definition at line 182 of file InfoAction.php.

References array(), and Html\rawElement().

Referenced by onView().

InfoAction::getContributors ( ) [protected]

Get a list of contributors of $article.

Returns:
string: html

Definition at line 750 of file InfoAction.php.

References $count, Action\$page, $s, $user, array(), as, Action\getLanguage(), SpecialPage\getTitleFor(), global, Linker\link(), Action\msg(), page, and params.

InfoAction::getDescription ( ) [protected]

Returns the description that goes below the "<h1>" tag.

Returns:
string

Reimplemented from Action.

Definition at line 813 of file InfoAction.php.

Returns the name of the action this object responds to.

Returns:
string lowercase

Reimplemented from Action.

Definition at line 38 of file InfoAction.php.

InfoAction::getPageTitle ( ) [protected]

Returns the name that goes in the "<h1>" page title.

Returns:
string

Reimplemented from Action.

Definition at line 742 of file InfoAction.php.

References Action\getTitle(), and Action\msg().

static InfoAction::invalidateCache ( Title title) [static]

Clear the info cache for a given Title.

Since:
1.22
Parameters:
Title$titleTitle to clear cache for

Definition at line 66 of file InfoAction.php.

References $key, $wgMemc, Action\factory(), Title\getPrefixedText(), global, and wfMemcKey().

Referenced by RefreshLinksJob\runForTitleInternal().

InfoAction::makeHeader ( header) [protected]

Creates a header that can be added to the output.

Parameters:
string$headerThe header text.
Returns:
string The HTML.

Definition at line 154 of file InfoAction.php.

References array(), Html\element(), Sanitizer\escapeId(), and Html\rawElement().

Referenced by onView().

Shows page information on GET request.

Returns:
string Page information that will be added to the output

Reimplemented from FormlessAction.

Definition at line 81 of file InfoAction.php.

References $name, $value, addRow(), addTable(), array(), as, Html\element(), Action\getContext(), makeHeader(), Action\msg(), page, pageInfo(), and wfRunHooks().

static InfoAction::pageCounts ( Title title) [static, protected]

Returns page counts that would be too "expensive" to retrieve by normal means.

Parameters:
Title$titleTitle to get counts for
Returns:
array

Definition at line 611 of file InfoAction.php.

References $dbr, $result, $wgDisableCounters, array(), Title\getArticleID(), Title\getDBkey(), Title\getNamespace(), global, MWNamespace\hasSubpages(), wfGetDB(), wfProfileIn(), and wfProfileOut().

Referenced by pageInfo().

InfoAction::pageInfo ( ) [protected]

Returns page information in an easily-manipulated format.

Array keys are used so extensions may add additional information in arbitrary positions. Array values are arrays with one element to be rendered as a header, arrays with two elements to be rendered as a table row.

Returns:
array

Definition at line 194 of file InfoAction.php.

References $batch, $dbr, $magicWords, $options, $property, $result, $title, $user, $value, $wgContLang, $wgMemc, array(), as, CACHE_VERSION, Html\element(), empty, Language\fetchLanguageName(), Revision\FOR_THIS_USER, Linker\formatHiddenCategories(), Linker\formatTemplates(), MagicWord\getDoubleUnderscoreArray(), Action\getLanguage(), Action\getTitle(), SpecialPage\getTitleFor(), Action\getUser(), global, MWNamespace\hasSubpages(), Linker\link(), Linker\linkKnown(), Action\msg(), Category\newFromTitle(), page, pageCounts(), Html\rawElement(), Linker\revUserTools(), wfGetDB(), and wfMemcKey().

Referenced by onView().

Whether this action can still be executed by a blocked user.

Returns:
bool

Reimplemented from Action.

Definition at line 47 of file InfoAction.php.

Whether this action requires the wiki not to be locked.

Returns:
bool

Reimplemented from Action.

Definition at line 56 of file InfoAction.php.


Member Data Documentation

const InfoAction::CACHE_VERSION = '2013-03-17'

Definition at line 31 of file InfoAction.php.

Referenced by pageInfo().


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