class Page extends AliasModel

A custom page

Constants

TABLE

The name of the database table used for queries

CREATE_PERMISSION

EDIT_PERMISSION

SOFT_DELETE_PERMISSION

HARD_DELETE_PERMISSION

Methods

string
getContent()

Get the raw content of the page

getCreated()

Get the page's submission time

getUpdated()

Get the time when the page was last updated

getAuthor()

Get the user who created the page

string
getStatus()

Get the status of the page

bool
isHomePage()

Find out whether this is the homepage

setContent(string $content)

Set the content of the page

setStatus(string $status)

Set the status of the page

updateEditTimestamp()

Update the last edit timestamp

static Page
addPage(string $title, string $content, int $authorID, string $status = 'live')

Create a new Page

static string
getRouteName(string $action = 'show')

Get the name of the route that shows the object

static string[]
getActiveStatuses()

Get the possible statuses representing an active model (visible to everyone)

static string
getEagerColumns()

Get the MySQL columns that will be loaded as soon as the model is created

static 
getLazyColumns()

{@inheritdoc}

static QueryBuilder
getQueryBuilder()

Get a query builder for pages

static Page
getHomePage() deprecated

Get the home page

Details

at line line 87
string getContent()

Get the raw content of the page

Return Value

string

at line line 98
TimeDate getCreated()

Get the page's submission time

Return Value

TimeDate

at line line 109
TimeDate getUpdated()

Get the time when the page was last updated

Return Value

TimeDate

at line line 120
Player getAuthor()

Get the user who created the page

Return Value

Player The page's author

at line line 129
string getStatus()

Get the status of the page

Return Value

string

at line line 138
bool isHomePage()

Find out whether this is the homepage

Return Value

bool

at line line 149
Page setContent(string $content)

Set the content of the page

Parameters

string $content

Return Value

Page

at line line 160
Page setStatus(string $status)

Set the status of the page

Parameters

string $status One of "live", "revision" or "disabled"

Return Value

Page

at line line 169
Page updateEditTimestamp()

Update the last edit timestamp

Return Value

Page

at line line 184
static Page addPage(string $title, string $content, int $authorID, string $status = 'live')

Create a new Page

Parameters

string $title The title of the page
string $content The content of page
int $authorID The ID of the author
string $status Page status: 'live','disabled',or 'deleted'

Return Value

Page An object representing the page that was just created

at line line 199
static string getRouteName(string $action = 'show')

Get the name of the route that shows the object

Parameters

string $action The route's suffix

Return Value

string

at line line 219
static string[] getActiveStatuses()

Get the possible statuses representing an active model (visible to everyone)

Return Value

string[]

at line line 227
static string getEagerColumns()

Get the MySQL columns that will be loaded as soon as the model is created

Return Value

string The columns in a format readable by MySQL

at line line 235
static getLazyColumns()

{@inheritdoc}

at line line 244
static QueryBuilder getQueryBuilder()

Get a query builder for pages

Return Value

QueryBuilder

at line line 260
static Page getHomePage() deprecated

deprecated

Get the home page

Return Value

Page