[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
User interface for page actions. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 2150 lines (67 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
Article:: (61 methods):
__construct()
newPage()
newFromID()
newFromTitle()
newFromWikiPage()
setRedirectedFrom()
getTitle()
getPage()
clear()
getContent()
getContentObject()
getOldID()
getOldIDFromRequest()
loadContent()
fetchContent()
fetchContentObject()
isCurrent()
getRevisionFetched()
getRevIdFetched()
view()
adjustDisplayTitle()
showDiffPage()
showCssOrJsPage()
getRobotPolicy()
formatRobotPolicy()
showRedirectedFromHeader()
showNamespaceHeader()
showViewFooter()
showPatrolFooter()
showMissingArticle()
showDeletedRevisionHeader()
setOldSubtitle()
viewRedirect()
getRedirectHeaderHtml()
render()
protect()
unprotect()
delete()
confirmDelete()
doDelete()
tryFileCache()
isFileCacheable()
getParserOutput()
setParserOptions()
getParserOptions()
setContext()
getContext()
__get()
__set()
__call()
doUpdateRestrictions()
updateRestrictions()
doDeleteArticle()
doRollback()
commitRollback()
generateReason()
selectFields()
onArticleCreate()
onArticleDelete()
onArticleEdit()
getAutosummary()
__construct( Title $title, $oldId = null ) X-Ref |
Constructor and clear the article param: Title $title Reference to a Title object. param: int $oldId Revision ID, null to fetch from request, zero for current |
newPage( Title $title ) X-Ref |
param: Title $title return: WikiPage |
newFromID( $id ) X-Ref |
Constructor from a page id param: int $id Article ID to load return: Article|null |
newFromTitle( $title, IContextSource $context ) X-Ref |
Create an Article object of the appropriate class for the given page. param: Title $title param: IContextSource $context return: Article |
newFromWikiPage( WikiPage $page, IContextSource $context ) X-Ref |
Create an Article object of the appropriate class for the given page. param: WikiPage $page param: IContextSource $context return: Article |
setRedirectedFrom( Title $from ) X-Ref |
Tell the page view functions that this view was redirected from another page on the wiki. param: Title $from |
getTitle() X-Ref |
Get the title object of the article return: Title Title object of this page |
getPage() X-Ref |
Get the WikiPage object of this instance return: WikiPage |
clear() X-Ref |
Clear the object |
getContent() X-Ref |
Note that getContent/loadContent do not follow redirects anymore. If you need to fetch redirectable content easily, try the shortcut in WikiPage::getRedirectTarget() This function has side effects! Do not use this function if you only want the real revision text if any. return: string Return the text of this revision |
getContentObject() X-Ref |
Returns a Content object representing the pages effective display content, not necessarily the revision's content! Note that getContent/loadContent do not follow redirects anymore. If you need to fetch redirectable content easily, try the shortcut in WikiPage::getRedirectTarget() This function has side effects! Do not use this function if you only want the real revision text if any. return: Content Return the content of this revision |
getOldID() X-Ref |
return: int The oldid of the article that is to be shown, 0 for the current revision |
getOldIDFromRequest() X-Ref |
Sets $this->mRedirectUrl to a correct URL if the query parameters are incorrect return: int The old id for the request |
loadContent() X-Ref |
Load the revision (including text) into this object |
fetchContent() X-Ref |
Get text of an article from database Does *NOT* follow redirects. return: string|bool String containing article contents, or false if null |
fetchContentObject() X-Ref |
Get text content object Does *NOT* follow redirects. return: Content|null|bool |
isCurrent() X-Ref |
Returns true if the currently-referenced revision is the current edit to this page (and it exists). return: bool |
getRevisionFetched() X-Ref |
Get the fetched Revision object depending on request parameters or null on failure. return: Revision|null |
getRevIdFetched() X-Ref |
Use this to fetch the rev ID used on page views return: int Revision ID of last article revision |
view() X-Ref |
This is the default action of the index.php entry point: just view the page of the given title. |
adjustDisplayTitle( ParserOutput $pOutput ) X-Ref |
Adjust title for pages with displaytitle, -{T|}- or language conversion param: ParserOutput $pOutput |
showDiffPage() X-Ref |
Show a diff page according to current request variables. For use within Article::view() only, other callers should use the DifferenceEngine class. |
showCssOrJsPage( $showCacheHint = true ) X-Ref |
Show a page view for a page formatted as CSS or JavaScript. To be called by Article::view() only. This exists mostly to serve the deprecated ShowRawCssJs hook (used to customize these views). It has been replaced by the ContentGetParserOutput hook, which lets you do the same but with more flexibility. param: bool $showCacheHint Whether to show a message telling the user |
getRobotPolicy( $action, $pOutput = null ) X-Ref |
Get the robot policy to be used for the current view param: string $action The action= GET parameter param: ParserOutput|null $pOutput return: array The policy that should be set |
formatRobotPolicy( $policy ) X-Ref |
Converts a String robot policy into an associative array, to allow merging of several policies using array_merge(). param: array|string $policy Returns empty array on null/false/'', transparent return: array 'index' => \<indexpolicy\>, 'follow' => \<followpolicy\> |
showRedirectedFromHeader() X-Ref |
If this request is a redirect view, send "redirected from" subtitle to the output. Returns true if the header was needed, false if this is not a redirect view. Handles both local and remote redirects. return: bool |
showNamespaceHeader() X-Ref |
Show a header specific to the namespace currently being viewed, like [[MediaWiki:Talkpagetext]]. For Article::view(). |
showViewFooter() X-Ref |
Show the footer section of an ordinary page view |
showPatrolFooter() X-Ref |
If patrol is possible, output a patrol UI box. This is called from the footer section of ordinary page views. If patrol is not possible or not desired, does nothing. Side effect: When the patrol link is build, this method will call OutputPage::preventClickjacking() and load mediawiki.page.patrol.ajax. return: bool |
showMissingArticle() X-Ref |
Show the error text for a missing article. For articles in the MediaWiki namespace, show the default message text. To be called from Article::view(). |
showDeletedRevisionHeader() X-Ref |
If the revision requested for view is deleted, check permissions. Send either an error message or a warning header to the output. return: bool True if the view is allowed, false if not. |
setOldSubtitle( $oldid = 0 ) X-Ref |
Generate the navigation links when browsing through an article revisions It shows the information as: Revision as of \<date\>; view current revision \<- Previous version | Next Version -\> param: int $oldid Revision ID of this article revision |
viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) X-Ref |
Return the HTML for the top of a redirect page Chances are you should just be using the ParserOutput from WikitextContent::getParserOutput instead of calling this for redirects. param: Title|array $target Destination(s) to redirect param: bool $appendSubtitle [optional] param: bool $forceKnown Should the image be shown as a bluelink regardless of existence? return: string Containing HTML with redirect link |
getRedirectHeaderHtml( Language $lang, $target, $forceKnown = false ) X-Ref |
Return the HTML for the top of a redirect page Chances are you should just be using the ParserOutput from WikitextContent::getParserOutput instead of calling this for redirects. param: Language $lang param: Title|array $target Destination(s) to redirect param: bool $forceKnown Should the image be shown as a bluelink regardless of existence? return: string Containing HTML with redirect link |
render() X-Ref |
Handle action=render |
protect() X-Ref |
action=protect handler |
unprotect() X-Ref |
action=unprotect handler (alias) |
delete() X-Ref |
UI entry point for page deletion |
confirmDelete( $reason ) X-Ref |
Output deletion confirmation dialog param: string $reason Prefilled reason |
doDelete( $reason, $suppress = false ) X-Ref |
Perform a deletion and output success or failure messages param: string $reason param: bool $suppress |
tryFileCache() X-Ref |
checkLastModified returns true if it has taken care of all output to the client that is necessary for this request. (that is, it has sent a cached version of the page) return: bool True if cached version send, false otherwise |
isFileCacheable() X-Ref |
Check if the page can be cached return: bool |
getParserOutput( $oldid = null, User $user = null ) X-Ref |
Lightweight method to get the parser output for a page, checking the parser cache and so on. Doesn't consider most of the stuff that WikiPage::view is forced to consider, so it's not appropriate to use there. param: int|null $oldid Revision ID or null param: User $user The relevant user return: ParserOutput|bool ParserOutput or false if the given revision ID is not found |
setParserOptions( ParserOptions $options ) X-Ref |
Override the ParserOptions used to render the primary article wikitext. param: ParserOptions $options |
getParserOptions() X-Ref |
Get parser options suitable for rendering the primary article wikitext return: ParserOptions |
setContext( $context ) X-Ref |
Sets the context this Article is executed in param: IContextSource $context |
getContext() X-Ref |
Gets the context this Article is executed in return: IContextSource |
__get( $fname ) X-Ref |
Use PHP's magic __get handler to handle accessing of raw WikiPage fields for backwards compatibility. param: string $fname Field name return: mixed |
__set( $fname, $fvalue ) X-Ref |
Use PHP's magic __set handler to handle setting of raw WikiPage fields for backwards compatibility. param: string $fname Field name param: mixed $fvalue New value |
__call( $fname, $args ) X-Ref |
Use PHP's magic __call handler to transform instance calls to WikiPage functions for backwards compatibility. param: string $fname Name of called method param: array $args Arguments to the method return: mixed |
doUpdateRestrictions( array $limit, array $expiry, &$cascade,$reason, User $user) X-Ref |
param: array $limit param: array $expiry param: bool $cascade param: string $reason param: User $user return: Status |
updateRestrictions( $limit = array() X-Ref |
param: array $limit param: string $reason param: int $cascade param: array $expiry return: bool |
doDeleteArticle( $reason, $suppress = false, $id = 0,$commit = true, &$error = '') X-Ref |
param: string $reason param: bool $suppress param: int $id param: bool $commit param: string $error return: bool |
doRollback( $fromP, $summary, $token, $bot, &$resultDetails, User $user = null ) X-Ref |
param: string $fromP param: string $summary param: string $token param: bool $bot param: array $resultDetails param: User|null $user return: array |
commitRollback( $fromP, $summary, $bot, &$resultDetails, User $guser = null ) X-Ref |
param: string $fromP param: string $summary param: bool $bot param: array $resultDetails param: User|null $guser return: array |
generateReason( &$hasHistory ) X-Ref |
param: bool $hasHistory return: mixed |
selectFields() X-Ref |
return: array |
onArticleCreate( $title ) X-Ref |
param: Title $title |
onArticleDelete( $title ) X-Ref |
param: Title $title |
onArticleEdit( $title ) X-Ref |
param: Title $title |
getAutosummary( $oldtext, $newtext, $flags ) X-Ref |
param: string $oldtext param: string $newtext param: int $flags return: string |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |