MediaWiki REL1_31
|
Displays information about a page. More...
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. | |
Public Member Functions inherited from FormlessAction | |
show () | |
The main action entry point. | |
Public Member Functions inherited from Action | |
__construct (Page $page, IContextSource $context=null) | |
Only public since 1.21. | |
addHelpLink ( $to, $overrideBaseUrl=false) | |
Adds help link with an icon via page indicators. | |
doesWrites () | |
Indicates whether this action may perform database writes. | |
getContext () | |
Get the IContextSource in use here. | |
getLanguage () | |
Shortcut to get the user Language being used for this instance. | |
getOutput () | |
Get the OutputPage being used for this instance. | |
getRequest () | |
Get the WebRequest being used for this instance. | |
getRestriction () | |
Get the permission required to perform this action. | |
getSkin () | |
Shortcut to get the Skin being used for this instance. | |
getTitle () | |
Shortcut to get the Title object from the page. | |
getUser () | |
Shortcut to get the User being used for this instance. | |
msg ( $key) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
Static Public Member Functions | |
static | invalidateCache (Title $title, $revid=null) |
Clear the info cache for a given Title. | |
Static Public Member Functions inherited from Action | |
static | exists ( $name) |
Check if a given action is recognised, even if it's disabled. | |
static | factory ( $action, Page $page, IContextSource $context=null) |
Get an appropriate Action subclass for the given action. | |
static | getActionName (IContextSource $context) |
Get the action that will be executed, not necessarily the one passed passed through the "action" request parameter. | |
Public Attributes | |
const | VERSION = 1 |
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, $canonicalId) | |
Creates a header that can be added to the output. | |
pageCounts (Page $page) | |
Returns page counts that would be too "expensive" to retrieve by normal means. | |
pageInfo () | |
Returns page information in an easily-manipulated format. | |
Protected Member Functions inherited from Action | |
checkCanExecute (User $user) | |
Checks if the given user (identified by an object) can perform this action. | |
setHeaders () | |
Set output headers for noindexing etc. | |
useTransactionalTimeLimit () | |
Call wfTransactionalTimeLimit() if this request was POSTed. | |
Static Protected Member Functions | |
static | getCacheKey (WANObjectCache $cache, Title $title, $revId) |
Additional Inherited Members | |
Protected Attributes inherited from Action | |
$context | |
IContextSource if specified; otherwise we'll use the Context from the Page. | |
$fields | |
The fields used to create the HTMLForm. | |
$page | |
Page on which we're performing the action. | |
Displays information about a page.
Definition at line 33 of file InfoAction.php.
|
protected |
Adds a row to a table that will be added to the content.
string | $table | The table that will be added to the content |
string | $name | The name of the row |
string | $value | The value of the row |
string | $id | The ID to use for the 'tr' element |
Definition at line 175 of file InfoAction.php.
References $value.
Referenced by onView().
|
protected |
Adds a table to the content that will be added to the output.
string | $content | The content that will be added to the output |
string | $table |
Definition at line 192 of file InfoAction.php.
Referenced by onView().
|
staticprotected |
WANObjectCache | $cache | |
Title | $title | |
int | $revId |
Definition at line 963 of file InfoAction.php.
References $cache.
Referenced by invalidateCache().
|
protected |
Get a list of contributors of $article.
Definition at line 886 of file InfoAction.php.
References $contributors, $lang, $linkRenderer, Action\$page, $s, Action\getLanguage(), and Action\msg().
|
protected |
Returns the description that goes below the "<h1>" tag.
Reimplemented from Action.
Definition at line 953 of file InfoAction.php.
InfoAction::getName | ( | ) |
Returns the name of the action this object responds to.
Reimplemented from Action.
Definition at line 41 of file InfoAction.php.
|
protected |
Returns the name that goes in the "<h1>" page title.
Reimplemented from Action.
Definition at line 878 of file InfoAction.php.
References Action\getTitle(), and Action\msg().
|
static |
Clear the info cache for a given Title.
Definition at line 70 of file InfoAction.php.
References $cache, and getCacheKey().
Referenced by WikiPage\doUpdateRestrictions(), WikiPage\onArticleDelete(), WikiPage\onArticleEdit(), and RefreshLinksJob\runForTitle().
|
protected |
Creates a header that can be added to the output.
string | $header | The header text. |
string | $canonicalId |
Definition at line 159 of file InfoAction.php.
References $header.
Referenced by onView().
InfoAction::onView | ( | ) |
Shows page information on GET request.
Reimplemented from FormlessAction.
Definition at line 87 of file InfoAction.php.
References $header, $value, addRow(), addTable(), Action\getContext(), makeHeader(), Action\msg(), pageInfo(), and text.
|
protected |
Returns page counts that would be too "expensive" to retrieve by normal means.
Definition at line 712 of file InfoAction.php.
References $cache, $dbr, $fname, Action\$page, $result, $tables, $wgActorTableSchemaMigrationStage, DB_REPLICA, function, MIGRATION_NEW, MIGRATION_OLD, wfGetDB(), and wfTimestamp().
Referenced by 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.
Definition at line 204 of file InfoAction.php.
References $batch, $lang, $linkRenderer, $magicWords, $options, $output, $property, $value, $wgContLang, Linker\formatHiddenCategories(), Action\getContext(), MagicWord\getDoubleUnderscoreArray(), PageProps\getInstance(), Action\getLanguage(), Action\getTitle(), Action\getUser(), Action\msg(), User\newFromName(), NS_CATEGORY, NS_FILE, pageCounts(), Linker\revUserTools(), text, and wfFindFile().
Referenced by onView().
InfoAction::requiresUnblock | ( | ) |
Whether this action can still be executed by a blocked user.
Reimplemented from Action.
Definition at line 50 of file InfoAction.php.
InfoAction::requiresWrite | ( | ) |
Whether this action requires the wiki not to be locked.
Reimplemented from Action.
Definition at line 59 of file InfoAction.php.
const InfoAction::VERSION = 1 |
Definition at line 34 of file InfoAction.php.