Retrieves information specific to a mobile page Currently this only provides helper functions for creating Page Thumbnail.
More...
|
const | SMALL_IMAGE_WIDTH = 150 |
|
const | TINY_IMAGE_WIDTH = 80 |
|
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
◆ __construct()
MobileFrontend\Models\MobilePage::__construct |
( |
Title | $title, |
|
|
| $file = false ) |
- Parameters
-
Title | $title | Page title |
File | false | $file | Page image file |
◆ 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
◆ getPlaceHolderThumbnailHtml()
static MobileFrontend\Models\MobilePage::getPlaceHolderThumbnailHtml |
( |
| $className, |
|
|
| $iconClassName = '' ) |
|
static |
Get a placeholder div container for thumbnails.
- Parameters
-
string | $className | Class for element |
string | $iconClassName | controls size of thumbnail, defaults to empty string |
- Returns
- string
◆ getSmallThumbnailHtml()
MobileFrontend\Models\MobilePage::getSmallThumbnailHtml |
( |
| $useBackgroundImage = false | ) |
|
Get a small sized thumbnail in div container.
- Parameters
-
bool | $useBackgroundImage | Whether the thumbnail should have a background image |
- Returns
- string
◆ getTitle()
MobileFrontend\Models\MobilePage::getTitle |
( |
| ) |
|
Get the title of the page.
- Returns
- Title
◆ hasThumbnail()
MobileFrontend\Models\MobilePage::hasThumbnail |
( |
| ) |
|
Check whether a page has a thumbnail associated with it.
- Returns
- bool whether the page has an image associated with it
◆ setLatestTimestamp()
MobileFrontend\Models\MobilePage::setLatestTimestamp |
( |
| $timestamp | ) |
|
Set rev_timestamp of latest edit to this page.
- Parameters
-
string | $timestamp | Timestamp (MW format) |
The documentation for this class was generated from the following file:
- includes/Models/MobilePage.php