MediaWiki
1.28.0
|
Displays information about a page. More...
Public Member Functions | |
getName () | |
Returns the name of the action this object responds to. More... | |
onView () | |
Shows page information on GET request. More... | |
requiresUnblock () | |
Whether this action can still be executed by a blocked user. More... | |
requiresWrite () | |
Whether this action requires the wiki not to be locked. More... | |
Public Member Functions inherited from FormlessAction | |
onView () | |
Show something on GET request. More... | |
show () | |
Public Member Functions inherited from Action | |
__construct (Page $page, IContextSource $context=null) | |
Constructor. More... | |
addHelpLink ($to, $overrideBaseUrl=false) | |
Adds help link with an icon via page indicators. More... | |
doesWrites () | |
Indicates whether this action may perform database writes. More... | |
getContext () | |
Get the IContextSource in use here. More... | |
getLanguage () | |
Shortcut to get the user Language being used for this instance. More... | |
getName () | |
Return the name of the action this object responds to. More... | |
getOutput () | |
Get the OutputPage being used for this instance. More... | |
getRequest () | |
Get the WebRequest being used for this instance. More... | |
getRestriction () | |
Get the permission required to perform this action. More... | |
getSkin () | |
Shortcut to get the Skin being used for this instance. More... | |
getTitle () | |
Shortcut to get the Title object from the page. More... | |
getUser () | |
Shortcut to get the User being used for this instance. More... | |
msg () | |
Get a Message object with context set Parameters are the same as wfMessage() More... | |
requiresUnblock () | |
Whether this action can still be executed by a blocked user. More... | |
requiresWrite () | |
Whether this action requires the wiki not to be locked. More... | |
show () | |
The main action entry point. More... | |
Static Public Member Functions | |
static | invalidateCache (Title $title, $revid=null) |
Clear the info cache for a given Title. More... | |
Static Public Member Functions inherited from Action | |
static | exists ($name) |
Check if a given action is recognised, even if it's disabled. More... | |
static | factory ($action, Page $page, IContextSource $context=null) |
Get an appropriate Action subclass for the given action. More... | |
static | getActionName (IContextSource $context) |
Get the action that will be executed, not necessarily the one passed passed through the "action" request parameter. More... | |
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. More... | |
addTable ($content, $table) | |
Adds a table to the content that will be added to the output. More... | |
getContributors () | |
Get a list of contributors of $article. More... | |
getDescription () | |
Returns the description that goes below the "<h1>" tag. More... | |
getPageTitle () | |
Returns the name that goes in the "<h1>" page title. More... | |
makeHeader ($header) | |
Creates a header that can be added to the output. More... | |
pageCounts (Page $page) | |
Returns page counts that would be too "expensive" to retrieve by normal means. More... | |
pageInfo () | |
Returns page information in an easily-manipulated format. More... | |
Protected Member Functions inherited from Action | |
checkCanExecute (User $user) | |
Checks if the given user (identified by an object) can perform this action. More... | |
getDescription () | |
Returns the description that goes below the \<h1\> tag. More... | |
getPageTitle () | |
Returns the name that goes in the \<h1\> page title. More... | |
setHeaders () | |
Set output headers for noindexing etc. More... | |
useTransactionalTimeLimit () | |
Call wfTransactionalTimeLimit() if this request was POSTed. More... | |
Static Protected Member Functions | |
static | getCacheKey (Title $title, $revId) |
Additional Inherited Members | |
Protected Attributes inherited from Action | |
$context | |
IContextSource if specified; otherwise we'll use the Context from the Page. More... | |
$fields | |
The fields used to create the HTMLForm. More... | |
$page | |
Page on which we're performing the action. More... | |
Displays information about a page.
Definition at line 32 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 168 of file InfoAction.php.
References $name, $value, and Html\rawElement().
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 | The table |
Definition at line 185 of file InfoAction.php.
References $content, and Html\rawElement().
Referenced by onView().
|
staticprotected |
Title | $title | |
int | $revId |
Definition at line 909 of file InfoAction.php.
References $revId, Title\getPrefixedText(), and wfMemcKey().
|
protected |
Get a list of contributors of $article.
Definition at line 834 of file InfoAction.php.
References $contributors, $count, $lang, Action\$page, $s, $user, as, Action\getLanguage(), SpecialPage\getTitleFor(), Linker\link(), Action\msg(), and page.
|
protected |
Returns the description that goes below the "<h1>" tag.
Definition at line 900 of file InfoAction.php.
InfoAction::getName | ( | ) |
Returns the name of the action this object responds to.
Definition at line 40 of file InfoAction.php.
|
protected |
Returns the name that goes in the "<h1>" page title.
Definition at line 826 of file InfoAction.php.
References Action\getTitle(), and Action\msg().
|
static |
Clear the info cache for a given Title.
Definition at line 69 of file InfoAction.php.
References ObjectCache\getMainWANInstance(), and Revision\newFromTitle().
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. |
Definition at line 153 of file InfoAction.php.
References $header, Html\element(), Sanitizer\escapeId(), and Html\rawElement().
Referenced by onView().
InfoAction::onView | ( | ) |
Shows page information on GET request.
Definition at line 85 of file InfoAction.php.
References $content, $header, $name, $value, addRow(), addTable(), as, Html\element(), Action\getContext(), makeHeader(), Action\msg(), page, pageInfo(), and Hooks\run().
|
protected |
Returns page counts that would be too "expensive" to retrieve by normal means.
Definition at line 690 of file InfoAction.php.
References $dbr, $fname, $title, DB_REPLICA, Database\getCacheSetOptions(), ObjectCache\getMainWANInstance(), MWNamespace\hasSubpages(), TS_UNIX, IExpiringStore\TTL_WEEK, use, 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 197 of file InfoAction.php.
References $batch, $lang, $linkRenderer, $magicWords, $options, $property, $title, $user, $value, $wgContLang, as, Html\element(), Language\fetchLanguageName(), Revision\FOR_THIS_USER, Linker\formatHiddenCategories(), Action\getContext(), MagicWord\getDoubleUnderscoreArray(), PageProps\getInstance(), Action\getLanguage(), ContentHandler\getLocalizedName(), Action\getTitle(), SpecialPage\getTitleFor(), SpecialPage\getTitleValueFor(), Action\getUser(), global, MWNamespace\hasSubpages(), Linker\link(), Linker\linkKnown(), Title\makeTitle(), Action\msg(), User\newFromName(), Category\newFromTitle(), NS_CATEGORY, NS_FILE, NS_USER, page, pageCounts(), Html\rawElement(), and Linker\revUserTools().
Referenced by onView().
InfoAction::requiresUnblock | ( | ) |
Whether this action can still be executed by a blocked user.
Definition at line 49 of file InfoAction.php.
InfoAction::requiresWrite | ( | ) |
Whether this action requires the wiki not to be locked.
Definition at line 58 of file InfoAction.php.
const InfoAction::VERSION = 1 |
Definition at line 33 of file InfoAction.php.