MediaWiki REL1_37
|
Displays information about a page. More...
Public Member Functions | |
__construct (Page $page, IContextSource $context, Language $contentLanguage, HookContainer $hookContainer, LanguageNameUtils $languageNameUtils, LinkBatchFactory $linkBatchFactory, LinkRenderer $linkRenderer, ILoadBalancer $loadBalancer, MagicWordFactory $magicWordFactory, NamespaceInfo $namespaceInfo, PageProps $pageProps, RepoGroup $repoGroup, RevisionLookup $revisionLookup, WANObjectCache $wanObjectCache, WatchedItemStoreInterface $watchedItemStore) | |
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 () | |
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. | |
getArticle () | |
Get a Article object. | |
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. | |
getWikiPage () | |
Get a WikiPage object. | |
msg ( $key,... $params) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
needsReadRights () | |
Indicates whether this action requires read rights. | |
Static Public Member Functions | |
static | invalidateCache (PageIdentity $page, $revid=null) |
Clear the info cache for a given Title. | |
Static Public Member Functions inherited from Action | |
static | exists (string $name) |
Check if a given action is recognised, even if it's disabled. | |
static | factory (string $action, Article $article, 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. | |
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. | |
getDescription () | |
Returns the description that goes below the "<h1>" tag. | |
getNamespaceProtectionMessage (Title $title) | |
Get namespace protection message for title or null if no namespace protection has been applied. | |
getPageTitle () | |
Returns the name that goes in the "<h1>" page title. | |
makeHeader ( $header, $canonicalId) | |
Creates a header that can be added to the output. | |
pageInfo () | |
Returns an array of info groups (will be rendered as tables), keyed by group ID. | |
Protected Member Functions inherited from Action | |
checkCanExecute (User $user) | |
Checks if the given user (identified by an object) can perform this action. | |
getHookContainer () | |
getHookRunner () | |
setHeaders () | |
Set output headers for noindexing etc. | |
useTransactionalTimeLimit () | |
Call wfTransactionalTimeLimit() if this request was POSTed. | |
Static Protected Member Functions | |
static | getCacheKey (WANObjectCache $cache, PageIdentity $page, $revId) |
Private Member Functions | |
pageCounts () | |
Returns page counts that would be too "expensive" to retrieve by normal means. | |
Additional Inherited Members | |
Protected Attributes inherited from Action | |
IContextSource | $context |
IContextSource if specified; otherwise we'll use the Context from the Page. | |
array | $fields |
The fields used to create the HTMLForm. | |
WikiPage Article ImagePage CategoryPage Page | $page |
Page on which we're performing the action. | |
Displays information about a page.
Definition at line 42 of file InfoAction.php.
InfoAction::__construct | ( | Page | $page, |
IContextSource | $context, | ||
Language | $contentLanguage, | ||
HookContainer | $hookContainer, | ||
LanguageNameUtils | $languageNameUtils, | ||
LinkBatchFactory | $linkBatchFactory, | ||
LinkRenderer | $linkRenderer, | ||
ILoadBalancer | $loadBalancer, | ||
MagicWordFactory | $magicWordFactory, | ||
NamespaceInfo | $namespaceInfo, | ||
PageProps | $pageProps, | ||
RepoGroup | $repoGroup, | ||
RevisionLookup | $revisionLookup, | ||
WANObjectCache | $wanObjectCache, | ||
WatchedItemStoreInterface | $watchedItemStore | ||
) |
Page | $page | |
IContextSource | $context | |
Language | $contentLanguage | |
HookContainer | $hookContainer | |
LanguageNameUtils | $languageNameUtils | |
LinkBatchFactory | $linkBatchFactory | |
LinkRenderer | $linkRenderer | |
ILoadBalancer | $loadBalancer | |
MagicWordFactory | $magicWordFactory | |
NamespaceInfo | $namespaceInfo | |
PageProps | $pageProps | |
RepoGroup | $repoGroup | |
RevisionLookup | $revisionLookup | |
WANObjectCache | $wanObjectCache | |
WatchedItemStoreInterface | $watchedItemStore |
Definition at line 101 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 | null | $id | The ID to use for the 'tr' element |
Definition at line 305 of file InfoAction.php.
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 322 of file InfoAction.php.
References $content.
Referenced by onView().
|
staticprotected |
WANObjectCache | $cache | |
PageIdentity | $page | |
int | $revId |
Definition at line 1091 of file InfoAction.php.
References $cache.
|
protected |
Returns the description that goes below the "<h1>" tag.
Reimplemented from Action.
Definition at line 1081 of file InfoAction.php.
InfoAction::getName | ( | ) |
Returns the name of the action this object responds to.
Reimplemented from Action.
Definition at line 139 of file InfoAction.php.
|
protected |
Get namespace protection message for title or null if no namespace protection has been applied.
Title | $title |
Definition at line 875 of file InfoAction.php.
Referenced by pageInfo().
|
protected |
Returns the name that goes in the "<h1>" page title.
Reimplemented from Action.
Definition at line 1072 of file InfoAction.php.
References getTitle().
|
static |
Clear the info cache for a given Title.
PageIdentity | $page | Title to clear cache for |
int | null | $revid | Revision id to clear |
Definition at line 168 of file InfoAction.php.
References $cache.
|
protected |
Creates a header that can be added to the output.
string | $header | The header text. |
string | $canonicalId |
Definition at line 281 of file InfoAction.php.
References $header.
Referenced by onView().
InfoAction::onView | ( | ) |
Shows page information on GET request.
Reimplemented from FormlessAction.
Definition at line 187 of file InfoAction.php.
References $content, $header, Action\addHelpLink(), addRow(), addTable(), Action\getArticle(), getContext(), Action\getOutput(), makeHeader(), Action\msg(), and pageInfo().
|
private |
Returns page counts that would be too "expensive" to retrieve by normal means.
Definition at line 912 of file InfoAction.php.
References $cache, $dbr, $title, $wgActorTableSchemaMigrationStage, WatchedItemStoreInterface\countVisitingWatchers(), WatchedItemStoreInterface\countWatchers(), DB_REPLICA, SCHEMA_COMPAT_READ_NEW, and wfTimestamp().
Referenced by pageInfo().
|
protected |
Returns an array of info groups (will be rendered as tables), keyed by group ID.
Group IDs are arbitrary and used so that extensions may add additional information in arbitrary positions (and as message keys for section headers for the tables, prefixed with 'pageinfo-'). Each info group is a non-associative array of info items (rendered as table rows). Each info item is an array with two elements: the first describes the type of information, the second the value for the current page. Both can be strings (will be interpreted as raw HTML) or messages (will be interpreted as plain text and escaped).
Definition at line 343 of file InfoAction.php.
References $lang, $magicWords, $title, Action\exists(), Linker\formatHiddenCategories(), Action\getArticle(), getAuthority(), getContext(), Action\getLanguage(), getNamespaceProtectionMessage(), getTitle(), SpecialPage\getTitleFor(), SpecialPage\getTitleValueFor(), Action\getUser(), Action\getWikiPage(), MediaWiki\Linker\LinkRenderer\makeKnownLink(), MediaWiki\Linker\LinkRenderer\makeLink(), Action\msg(), User\newFromName(), NS_CATEGORY, NS_FILE, NS_USER, NS_USER_TALK, pageCounts(), and Linker\revUserTools().
Referenced by onView().
InfoAction::requiresUnblock | ( | ) |
Whether this action can still be executed by a blocked user.
Reimplemented from Action.
Definition at line 148 of file InfoAction.php.
InfoAction::requiresWrite | ( | ) |
Whether this action requires the wiki not to be locked.
Reimplemented from Action.
Definition at line 157 of file InfoAction.php.
|
private |
Definition at line 46 of file InfoAction.php.
|
private |
Definition at line 49 of file InfoAction.php.
|
private |
Definition at line 52 of file InfoAction.php.
|
private |
Definition at line 55 of file InfoAction.php.
|
private |
Definition at line 58 of file InfoAction.php.
|
private |
Definition at line 61 of file InfoAction.php.
|
private |
Definition at line 64 of file InfoAction.php.
|
private |
Definition at line 67 of file InfoAction.php.
|
private |
Definition at line 70 of file InfoAction.php.
|
private |
Definition at line 73 of file InfoAction.php.
|
private |
Definition at line 76 of file InfoAction.php.
|
private |
Definition at line 79 of file InfoAction.php.
|
private |
Definition at line 82 of file InfoAction.php.
|
private |
Definition at line 43 of file InfoAction.php.