MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontend\Models\MobilePage Class Reference

Retrieves information specific to a mobile page Currently this only provides helper functions for creating Page Thumbnail. More...

Public Member Functions

 __construct (Title $title, $file=false)
 
 getLatestTimestamp ()
 Retrieve timestamp when the page content was last modified.
 
 getLatestEdit ()
 Retrieve the last edit to this page.
 
 getTitle ()
 Get the title of the page.
 
 getSmallThumbnailHtml ( $useBackgroundImage=false)
 Get a small sized thumbnail in div container.
 

Public Attributes

const SMALL_IMAGE_WIDTH = 220
 
const TINY_IMAGE_WIDTH = 120
 

Detailed Description

Retrieves information specific to a mobile page Currently this only provides helper functions for creating Page Thumbnail.

Todo
FIXME: Rename this class when its purpose becomes clearer

Constructor & Destructor Documentation

◆ __construct()

MobileFrontend\Models\MobilePage::__construct ( Title $title,
$file = false )
Parameters
Title$titlePage title
File | false$filePage image file

Member Function Documentation

◆ getLatestEdit()

MobileFrontend\Models\MobilePage::getLatestEdit ( )

Retrieve the last edit to this page.

Returns
array defining edit with keys:
  • string name
  • string timestamp (Unix format)
  • string gender

◆ getLatestTimestamp()

MobileFrontend\Models\MobilePage::getLatestTimestamp ( )

Retrieve timestamp when the page content was last modified.

Does not reflect null edits.

Returns
string|bool Timestamp (MW format) or false

◆ getSmallThumbnailHtml()

MobileFrontend\Models\MobilePage::getSmallThumbnailHtml ( $useBackgroundImage = false)

Get a small sized thumbnail in div container.

Parameters
bool$useBackgroundImageWhether the thumbnail should have a background image
Returns
string

◆ getTitle()

MobileFrontend\Models\MobilePage::getTitle ( )

Get the title of the page.

Returns
Title

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