BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ImagePage Class Reference
Inheritance diagram for ImagePage:
Collaboration diagram for ImagePage:

Public Member Functions

 setFile ($file)
 
 render ()
 
 view ()
 
 getDisplayedFile ()
 
 getContentObject ()
 
 getUploadUrl ()
 
 delete ()
 
 showError ($description)
 
 getImageLimitsFromOption ($user, $optionName)
 
 getFile ()
 
 isLocal ()
 
 getDuplicates ()
 
 getForeignCategories ()
 
- Public Member Functions inherited from Article
 __construct (Title $title, $oldId=null)
 
 setRedirectedFrom (Title $from)
 
 getTitle ()
 
 getPage ()
 
 clear ()
 
 getContent ()
 
 getOldID ()
 
 getOldIDFromRequest ()
 
 isCurrent ()
 
 getRevisionFetched ()
 
 getRevIdFetched ()
 
 view ()
 
 adjustDisplayTitle (ParserOutput $pOutput)
 
 getRobotPolicy ($action, $pOutput=null)
 
 showRedirectedFromHeader ()
 
 showNamespaceHeader ()
 
 showViewFooter ()
 
 showPatrolFooter ()
 
 showMissingArticle ()
 
 showDeletedRevisionHeader ()
 
 setOldSubtitle ($oldid=0)
 
 viewRedirect ($target, $appendSubtitle=true, $forceKnown=false)
 
 addHelpLink ($to, $overrideBaseUrl=false)
 
 render ()
 
 protect ()
 
 unprotect ()
 
 delete ()
 
 confirmDelete ($reason)
 
 doDelete ($reason, $suppress=false)
 
 isFileCacheable ()
 
 getParserOutput ($oldid=null, User $user=null)
 
 setParserOptions (ParserOptions $options)
 
 getParserOptions ()
 
 setContext ($context)
 
 getContext ()
 
 __get ($fname)
 
 __set ($fname, $fvalue)
 
 checkFlags ($flags)
 
 checkTouched ()
 
 clearPreparedEdit ()
 
 doDeleteArticleReal ($reason, $suppress=false, $u1=null, $u2=null, &$error= '', User $user=null)
 
 doDeleteUpdates ($id, Content $content=null)
 
 doEdit ($text, $summary, $flags=0, $baseRevId=false, $user=null)
 
 doEditContent (Content $content, $summary, $flags=0, $baseRevId=false, User $user=null, $serialFormat=null)
 
 doEditUpdates (Revision $revision, User $user, array $options=[])
 
 doPurge ()
 
 doQuickEditContent (Content $content, User $user, $comment= '', $minor=false, $serialFormat=null)
 
 doViewUpdates (User $user, $oldid=0)
 
 exists ()
 
 followRedirect ()
 
 getActionOverrides ()
 
 getAutoDeleteReason (&$hasHistory)
 
 getCategories ()
 
 getComment ($audience=Revision::FOR_PUBLIC, User $user=null)
 
 getContentHandler ()
 
 getContentModel ()
 
 getContributors ()
 
 getCreator ($audience=Revision::FOR_PUBLIC, User $user=null)
 
 getDeletionUpdates (Content $content=null)
 
 getHiddenCategories ()
 
 getId ()
 
 getLatest ()
 
 getLinksTimestamp ()
 
 getMinorEdit ()
 
 getOldestRevision ()
 
 getRedirectTarget ()
 
 getRedirectURL ($rt)
 
 getRevision ()
 
 getText ($audience=Revision::FOR_PUBLIC, User $user=null)
 
 getTimestamp ()
 
 getTouched ()
 
 getUndoContent (Revision $undo, Revision $undoafter=null)
 
 getUser ($audience=Revision::FOR_PUBLIC, User $user=null)
 
 getUserText ($audience=Revision::FOR_PUBLIC, User $user=null)
 
 hasViewableContent ()
 
 insertOn ($dbw, $pageId=null)
 
 insertProtectNullRevision ($revCommentMsg, array $limit, array $expiry, $cascade, $reason, $user=null)
 
 insertRedirect ()
 
 insertRedirectEntry (Title $rt, $oldLatest=null)
 
 isCountable ($editInfo=false)
 
 isRedirect ()
 
 loadFromRow ($data, $from)
 
 loadPageData ($from= 'fromdb')
 
 lockAndGetLatest ()
 
 makeParserOptions ($context)
 
 pageDataFromId ($dbr, $id, $options=[])
 
 pageDataFromTitle ($dbr, $title, $options=[])
 
 prepareContentForEdit (Content $content, $revision=null, User $user=null, $serialFormat=null, $useCache=true)
 
 prepareTextForEdit ($text, $revid=null, User $user=null)
 
 protectDescription (array $limit, array $expiry)
 
 protectDescriptionLog (array $limit, array $expiry)
 
 replaceSectionAtRev ($sectionId, Content $sectionContent, $sectionTitle= '', $baseRevId=null)
 
 replaceSectionContent ($sectionId, Content $sectionContent, $sectionTitle= '', $edittime=null)
 
 setTimestamp ($ts)
 
 shouldCheckParserCache (ParserOptions $parserOptions, $oldId)
 
 supportsSections ()
 
 triggerOpportunisticLinksUpdate (ParserOutput $parserOutput)
 
 updateCategoryCounts (array $added, array $deleted)
 
 updateIfNewerOn ($dbw, $revision)
 
 updateRedirectOn ($dbw, $redirectTitle, $lastRevIsRedirect=null)
 
 updateRevisionOn ($dbw, $revision, $lastRevision=null, $lastRevIsRedirect=null)
 
 doUpdateRestrictions (array $limit, array $expiry, &$cascade, $reason, User $user)
 
 updateRestrictions ($limit=[], $reason= '', &$cascade=0, $expiry=[])
 
 doDeleteArticle ($reason, $suppress=false, $u1=null, $u2=null, &$error= '')
 
 doRollback ($fromP, $summary, $token, $bot, &$resultDetails, User $user=null)
 
 commitRollback ($fromP, $summary, $bot, &$resultDetails, User $guser=null)
 
 generateReason (&$hasHistory)
 

Static Public Member Functions

static newFromID ($id)
 
- Static Public Member Functions inherited from Article
static newFromID ($id)
 
static newFromTitle ($title, IContextSource $context)
 
static newFromWikiPage (WikiPage $page, IContextSource $context)
 
static formatRobotPolicy ($policy)
 
static purgePatrolFooterCache ($articleID)
 
static selectFields ()
 
static onArticleCreate ($title)
 
static onArticleDelete ($title)
 
static onArticleEdit ($title)
 
static getAutosummary ($oldtext, $newtext, $flags)
 

Protected Member Functions

 newPage (Title $title)
 
 loadFile ()
 
 showTOC ($metadata)
 
 makeMetadataTable ($metadata)
 
 openShowImage ()
 
 printSharedImageText ()
 
 uploadLinksBox ()
 
 closeShowImage ()
 
 imageHistory ()
 
 queryImageLinks ($target, $limit)
 
 imageLinks ()
 
 compare ($a, $b)
 
 doRenderLangOpt (array $langChoices, $curLang, $defaultLang)
 
 getDisplayWidthHeight ($maxWidth, $maxHeight, $width, $height)
 
 getThumbSizes ($origWidth, $origHeight)
 
- Protected Member Functions inherited from Article
 newPage (Title $title)
 
 getContentObject ()
 
 fetchContent ()
 
 fetchContentObject ()
 
 showDiffPage ()
 
 showCssOrJsPage ($showCacheHint=true)
 
 tryFileCache ()
 

Protected Attributes

 $mExtraDescription = false
 
 $mPage
 
- Protected Attributes inherited from Article
 $mContext
 
 $mPage
 

Additional Inherited Members

- Public Attributes inherited from Article
 $mParserOptions
 
 $mContent
 
 $mContentObject
 
 $mContentLoaded = false
 
 $mOldId
 
 $mRedirectedFrom = null
 
 $mRedirectUrl = false
 
 $mRevIdFetched = 0
 
 $mRevision = null
 
 $mParserOutput
 

Detailed Description

Class for viewing MediaWiki file description pages

Member Function Documentation

ImagePage::closeShowImage ( )
protected

For overloading

ImagePage::compare (   $a,
  $b 
)
protected

Callback for usort() to do link sorts by (namespace, title) Function copied from Title::compare()

Parameters
object$aObject page to compare with
object$bObject page to compare with
Returns
int Result of string comparison, or namespace comparison
ImagePage::delete ( )

Delete the file, or an earlier version of it

ImagePage::doRenderLangOpt ( array  $langChoices,
  $curLang,
  $defaultLang 
)
protected

Output a drop-down box for language options for the file

Parameters
array$langChoicesArray of string language codes
string$curLangLanguage code file is being viewed in.
string$defaultLangLanguage code that image is rendered in by default
Returns
string HTML to insert underneath image.
ImagePage::getContentObject ( )

Overloading Article's getContentObject method.

Omit noarticletext if sharedupload; text will be fetched from the shared upload server if possible.

Returns
string
ImagePage::getDisplayedFile ( )
Returns
File
ImagePage::getDisplayWidthHeight (   $maxWidth,
  $maxHeight,
  $width,
  $height 
)
protected

Get the width and height to display image at.

Note
This method assumes that it is only called if one of the dimensions are bigger than the max, or if the image is vectorized.
Parameters
int$maxWidthMax width to display at
int$maxHeightMax height to display at
int$widthActual width of the image
int$heightActual height of the image
Exceptions
MWException
Returns
array Array (width, height)
ImagePage::getDuplicates ( )
See Also
WikiFilePage::getDuplicates
Returns
array|null
ImagePage::getFile ( )
See Also
WikiFilePage::getFile
Returns
bool|File
ImagePage::getForeignCategories ( )
See Also
WikiFilePage::getForeignCategories
Returns
TitleArray|Title[]
ImagePage::getImageLimitsFromOption (   $user,
  $optionName 
)

Returns the corresponding $wgImageLimits entry for the selected user option

Parameters
User$user
string$optionNameName of a option to check, typically imagesize or thumbsize
Returns
array
Since
1.21
ImagePage::getThumbSizes (   $origWidth,
  $origHeight 
)
protected

Get alternative thumbnail sizes.

Note
This will only list several alternatives if thumbnails are rendered on 404
Parameters
int$origWidthActual width of image
int$origHeightActual height of image
Returns
array An array of [width, height] pairs.
ImagePage::imageHistory ( )
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.

ImagePage::isLocal ( )
See Also
WikiFilePage::isLocal
Returns
bool
ImagePage::makeMetadataTable (   $metadata)
protected

Make a table with metadata to be shown in the output page.

Todo:
FIXME: Bad interface, see note on MediaHandler::formatMetadata().
Parameters
array$metadataThe array containing the Exif data
Returns
string The metadata table. This is treated as Wikitext (!)
static ImagePage::newFromID (   $id)
static

Constructor from a page id

Parameters
int$idArticle ID to load
Returns
ImagePage|null
ImagePage::newPage ( Title  $title)
protected
Parameters
Title$title
Returns
WikiFilePage
ImagePage::printSharedImageText ( )
protected

Show a notice that the file is from a shared repository

ImagePage::queryImageLinks (   $target,
  $limit 
)
protected
Parameters
string$target
int$limit
Returns
ResultWrapper
ImagePage::render ( )

Handler for action=render Include body text only; none of the image extras

ImagePage::setFile (   $file)
Parameters
File$file
Returns
void
ImagePage::showError (   $description)

Display an error with a wikitext description

Parameters
string$description
ImagePage::showTOC (   $metadata)
protected

Create the TOC

Parameters
bool$metadataWhether or not to show the metadata link
Returns
string
ImagePage::uploadLinksBox ( )
protected

Print out the various links at the bottom of the image page, e.g. reupload, external editing (and instructions link) etc.


The documentation for this class was generated from the following file: