|
MediaWiki master
|
Rendering of file description pages. More...
Inherits MediaWiki\Page\Article.

Public Member Functions | |
| getDisplayedFile () | |
| getDuplicates () | |
| getFile () | |
| getForeignCategories () | |
| getUploadUrl () | |
| isLocal () | |
| setFile ( $file) | |
| showError ( $description) | |
| Display an error with a wikitext description. | |
| view () | |
| This is the default action of the index.php entry point: just view the page of the given title. | |
| Public Member Functions inherited from MediaWiki\Page\Article | |
| __construct (Title $title, $oldId=null) | |
| addHelpLink ( $to, $overrideBaseUrl=false) | |
| Adds help link with an icon via page indicators. | |
| adjustDisplayTitle (ParserOutput $pOutput) | |
| Adjust title for pages with displaytitle, -{T|}- or language conversion. | |
| clear () | |
| fetchRevisionRecord () | |
| Fetches the revision to work on. | |
| getActionOverrides () | |
| Call to WikiPage function for backwards compatibility. | |
| getContext () | |
| Gets the context this Article is executed in. | |
| getOldID () | |
| getOldIDFromRequest () | |
| Sets $this->mRedirectUrl to a correct URL if the query parameters are incorrect. | |
| getPage () | |
| Get the WikiPage object of this instance. | |
| getParserOptions (?int $oldid=null, ?UserIdentity $user=null) | |
| Get parser options suitable for rendering the primary article wikitext. | |
| getParserOutput ( $oldid=null, ?UserIdentity $user=null, array $options=[]) | |
| Lightweight method to get the parser output for a page, checking the parser cache and so on. | |
| getRedirectedFrom () | |
| Get the page this view was redirected from. | |
| getRevIdFetched () | |
| Use this to fetch the rev ID used on page views. | |
| getRobotPolicy ( $action, ?ParserOutput $pOutput=null) | |
| Get the robot policy to be used for the current view. | |
| getTitle () | |
| Get the title object of the article. | |
| isCurrent () | |
| Returns true if the currently-referenced revision is the current edit to this page (and it exists). | |
| isFileCacheable ( $mode=HTMLFileCache::MODE_NORMAL) | |
| Check if the page can be cached. | |
| protect () | |
| action=protect handler | |
| render () | |
| Handle action=render. | |
| setContext ( $context) | |
| Sets the context this Article is executed in. | |
| setOldSubtitle ( $oldid=0) | |
| Generate the navigation links when browsing through an article revisions It shows the information as: Revision as of \<date\>; view latest revision \<- Previous version | Next Version -\>. | |
| setRedirectedFrom (Title $from) | |
| Tell the page view functions that this view was redirected from another page on the wiki. | |
| setUseLegacyPostprocCache (bool $val=true) | |
| By default, we do not use the postprocessing cache for legacy parses; however, we want to be able to override this for some cases (e.g. | |
| showDeletedRevisionHeader () | |
| If the revision requested for view is deleted, check permissions. | |
| showMissingArticle () | |
| Show the error text for a missing article. | |
| showNamespaceHeader () | |
| Show a header specific to the page currently being viewed. | |
| showPatrolFooter () | |
| If patrol is possible, output a patrol UI box. | |
| showProtectionIndicator () | |
| Show a lock icon above the article body if the page is protected. | |
| showRedirectedFromHeader () | |
| If this request is a redirect view, send "redirected from" subtitle to the output. | |
| showViewFooter () | |
| Show the footer section of an ordinary page view. | |
| unprotect () | |
| action=unprotect handler (alias) | |
Protected Member Functions | |||||||
| closeShowImage () | |||||||
| For overloading. | |||||||
| compare ( $a, $b) | |||||||
| Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare(). | |||||||
| doRenderLangOpt (array $langChoices, $renderLang) | |||||||
| Output a drop-down box for language options for the file. | |||||||
| getThumbPrevText ( $params, $sizeLinkBigImagePreview) | |||||||
| Make the text under the image to say what size preview. | |||||||
| getThumbSizes ( $origWidth, $origHeight) | |||||||
| Get alternative thumbnail sizes. | |||||||
| imageDupes () | |||||||
| imageHistory () | |||||||
| If the page we've just displayed is in the "Image" namespace, we follow it with an upload history of the image and its usage. | |||||||
| imageLinks () | |||||||
| loadFile () | |||||||
| makeMetadataTable ( $metadata) | |||||||
| Make a table with metadata to be shown in the output page. | |||||||
| makeSizeLink ( $params, $width, $height) | |||||||
| Creates a thumbnail of specified size and returns an HTML link to it. | |||||||
| modifyTextOptions (OutputPage $outputPage, array &$textOptions) | |||||||
Allow subclasses to adjust the post-processing options used when rendering the page content (the parsed article body).
| |||||||
| openShowImage () | |||||||
| printSharedImageText () | |||||||
| Show a notice that the file is from a shared repository. | |||||||
| queryImageLinks ( $target, $limit) | |||||||
| uploadLinksBox () | |||||||
| Add the re-upload link (or message about not being able to re-upload) to the output. | |||||||
| Protected Member Functions inherited from MediaWiki\Page\Article | |||||||
| isDiffOnlyView () | |||||||
| newPage (Title $title) | |||||||
| showDiffPage () | |||||||
| Show a diff page according to current request variables. | |||||||
| tryFileCache () | |||||||
| checkLastModified returns true if it has taken care of all output to the client that is necessary for this request. | |||||||
Protected Attributes | |
| string false | $mExtraDescription = false |
| Guaranteed to be HTML, {. | |
| Protected Attributes inherited from MediaWiki\Page\Article | |
| DatabaseBlockStore | $blockStore |
| IConnectionProvider | $dbProvider |
| LinkRenderer | $linkRenderer |
| WikiPage | $mPage |
| The WikiPage object of this instance. | |
| RestrictionStore | $restrictionStore |
| bool | $viewIsRenderAction = false |
| Whether render() was called. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from MediaWiki\Page\Article | |
| static | formatRobotPolicy ( $policy) |
| Converts a String robot policy into an associative array, to allow merging of several policies using array_merge(). | |
| static | newFromID ( $id) |
| Constructor from a page id. | |
| static | newFromTitle ( $title, IContextSource $context) |
| Create an Article object of the appropriate class for the given page. | |
| static | newFromWikiPage (WikiPage $page, IContextSource $context) |
| Create an Article object of the appropriate class for the given page. | |
| static | purgePatrolFooterCache ( $articleID) |
| Purge the cache used to check if it is worth showing the patrol footer For example, it is done during re-uploads when file patrol is used. | |
| Public Attributes inherited from MediaWiki\Page\Article | |
| int null | $mOldId |
| The oldid of the article that was requested to be shown, 0 for the latest revision. | |
| ParserOutput null false | $mParserOutput = null |
| The ParserOutput generated for viewing the page, initialized by view(). | |
| Title null | $mRedirectedFrom = null |
| Title from which we were redirected here, if any. | |
| string false | $mRedirectUrl = false |
| URL to redirect to or false if none. | |
Rendering of file description pages.
@method WikiFilePage getPage()
Definition at line 38 of file ImagePage.php.
|
protected |
|
protected |
Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare().
| stdClass | $a | Object page to compare with |
| stdClass | $b | Object page to compare with |
Definition at line 1194 of file ImagePage.php.
Referenced by imageLinks().
|
protected |
Output a drop-down box for language options for the file.
| array | $langChoices | Array of string language codes |
| string | null | $renderLang | Language code for the language we want the file to rendered in, it is pre-selected in the drop down box, use null to select the default case in the option list |
Definition at line 1207 of file ImagePage.php.
References MediaWiki\Html\element(), MediaWiki\Page\Article\getContext(), MediaWiki\Page\Article\getTitle(), and MediaWiki\MainConfigNames\Script.
Referenced by openShowImage().
| MediaWiki\Page\ImagePage::getDisplayedFile | ( | ) |
Definition at line 253 of file ImagePage.php.
References loadFile().
Referenced by MediaWiki\Page\ImageHistoryList\__construct().
| MediaWiki\Page\ImagePage::getDuplicates | ( | ) |
Definition at line 1323 of file ImagePage.php.
References MediaWiki\Page\Article\getPage().
| MediaWiki\Page\ImagePage::getFile | ( | ) |
Definition at line 1307 of file ImagePage.php.
References getFile(), MediaWiki\Page\Article\getPage(), and return.
Referenced by getFile(), getUploadUrl(), imageHistory(), openShowImage(), printSharedImageText(), uploadLinksBox(), and view().
| MediaWiki\Page\ImagePage::getForeignCategories | ( | ) |
Definition at line 1331 of file ImagePage.php.
References MediaWiki\Page\Article\getPage().
|
protected |
Make the text under the image to say what size preview.
| array | $params | parameters for thumbnail |
| string | $sizeLinkBigImagePreview | HTML for the current size |
Definition at line 806 of file ImagePage.php.
References MediaWiki\Page\Article\getContext().
Referenced by openShowImage().
|
protected |
Get alternative thumbnail sizes.
| int | $origWidth | Actual width of image |
| int | $origHeight | Actual height of image |
Definition at line 1276 of file ImagePage.php.
References MediaWiki\Page\Article\getContext(), and MediaWiki\MainConfigNames\ImageLimits.
Referenced by openShowImage().
| MediaWiki\Page\ImagePage::getUploadUrl | ( | ) |
Definition at line 913 of file ImagePage.php.
References getFile(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), and loadFile().
Referenced by uploadLinksBox().
|
protected |
Definition at line 1134 of file ImagePage.php.
References MediaWiki\Page\Article\getContext(), MediaWiki\FileRepo\File\File\getDescriptionUrl(), MediaWiki\Page\Article\getPage(), MediaWiki\FileRepo\File\File\getRepo(), MediaWiki\FileRepo\File\File\getTitle(), MediaWiki\Page\Article\getTitle(), MediaWiki\FileRepo\File\File\isLocal(), and loadFile().
Referenced by view().
|
protected |
If the page we've just displayed is in the "Image" namespace, we follow it with an upload history of the image and its usage.
Definition at line 969 of file ImagePage.php.
References MediaWiki\Page\Article\getContext(), getFile(), MediaWiki\MediaWikiServices\getInstance(), loadFile(), and uploadLinksBox().
Referenced by view().
|
protected |
Definition at line 1008 of file ImagePage.php.
References compare(), MediaWiki\Page\Article\getContext(), MediaWiki\Page\Article\getTitle(), MediaWiki\Deferred\LinksUpdate\GenericPageLinksTable\makeTitle(), NS_FILE, and queryImageLinks().
Referenced by view().
| MediaWiki\Page\ImagePage::isLocal | ( | ) |
Definition at line 1315 of file ImagePage.php.
References MediaWiki\Page\Article\getPage().
Referenced by uploadLinksBox().
|
protected |
Definition at line 71 of file ImagePage.php.
References MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Page\Article\getPage(), and MediaWiki\Page\Article\getTitle().
Referenced by getDisplayedFile(), getUploadUrl(), imageDupes(), imageHistory(), openShowImage(), printSharedImageText(), uploadLinksBox(), and view().
|
protected |
Make a table with metadata to be shown in the output page.
| array<string,array[]> | $metadata The array containing the Exif data |
Definition at line 389 of file ImagePage.php.
References MediaWiki\Page\Article\getContext().
Referenced by view().
|
protected |
Creates a thumbnail of specified size and returns an HTML link to it.
| array | $params | Scaler parameters |
| int | $width | |
| int | $height |
Definition at line 844 of file ImagePage.php.
Referenced by openShowImage().
|
protected |
Allow subclasses to adjust the post-processing options used when rendering the page content (the parsed article body).
| OutputPage | $outputPage | |
| array | &$textOptions | Options passed to OutputTransformPipeline::run(); see the keys listed in ParserOptions::$postprocOptions |
Suppresses the file description's own inline table of contents while the file page renders its combined table of contents (i.e. once $this->tocSections has been collected in ::view()); its headings are merged into that combined TOC instead.
Reimplemented from MediaWiki\Page\Article.
Definition at line 266 of file ImagePage.php.
References if.
|
protected |
Definition at line 442 of file ImagePage.php.
References $request, doRenderLangOpt(), MediaWiki\Html\element(), MediaWiki\MainConfigNames\EnableUploads, MediaWiki\Page\Article\getContext(), getFile(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Page\Article\getPage(), getThumbPrevText(), getThumbSizes(), MediaWiki\Page\Article\getTitle(), MediaWiki\SpecialPage\SpecialPage\getTitleFor(), loadFile(), makeSizeLink(), printSharedImageText(), MediaWiki\MainConfigNames\Script, MediaWiki\MainConfigNames\Send404Code, MediaWiki\MainConfigNames\SVGMaxSize, MediaWiki\MainConfigNames\SVGNativeRendering, wfEscapeWikiText(), and wfMessageFallback().
Referenced by view().
|
protected |
Show a notice that the file is from a shared repository.
Definition at line 880 of file ImagePage.php.
References MediaWiki\Page\Article\getContext(), getFile(), MediaWiki\Page\Article\getPage(), and loadFile().
Referenced by openShowImage().
|
protected |
| string | string[] | $target | |
| int | $limit |
Definition at line 993 of file ImagePage.php.
References NS_FILE.
Referenced by imageLinks().
| MediaWiki\Page\ImagePage::setFile | ( | $file | ) |
| File | $file |
Definition at line 65 of file ImagePage.php.
References MediaWiki\Page\Article\getPage().
| MediaWiki\Page\ImagePage::showError | ( | $description | ) |
Display an error with a wikitext description.
| string | $description |
Definition at line 1177 of file ImagePage.php.
References MediaWiki\Page\Article\getContext().
|
protected |
Add the re-upload link (or message about not being able to re-upload) to the output.
Definition at line 925 of file ImagePage.php.
References MediaWiki\Html\element(), MediaWiki\MainConfigNames\EnableUploads, MediaWiki\Page\Article\getContext(), getFile(), MediaWiki\Page\Article\getTitle(), getUploadUrl(), isLocal(), and loadFile().
Referenced by imageHistory().
| MediaWiki\Page\ImagePage::view | ( | ) |
This is the default action of the index.php entry point: just view the page of the given title.
Reimplemented from MediaWiki\Page\Article.
Definition at line 96 of file ImagePage.php.
References $request, closeShowImage(), MediaWiki\Html\element(), MediaWiki\Page\Article\getContext(), getFile(), MediaWiki\Page\Article\getPage(), MediaWiki\Page\Article\getTitle(), imageDupes(), imageHistory(), imageLinks(), MediaWiki\Page\Article\isDiffOnlyView(), loadFile(), makeMetadataTable(), NS_FILE, openShowImage(), and MediaWiki\MainConfigNames\ShowEXIF.
|
protected |
Guaranteed to be HTML, {.
Definition at line 51 of file ImagePage.php.