CoolCMS API

PageInitTrait

Table of Contents

Properties

$pageManager  : PageManager
$pageEntity  : Page|null

Methods

getPageEntity()  : Page|null
loadPageEntity()  : Page|null
Returns the page of the request by `slug` (empty is the home page, a number is the ID, otherwise `href`).
initializeExternalFiles()  : void
initializeMetaTags()  : void
initializePage()  : void

Properties

Methods

loadPageEntity()

Returns the page of the request by `slug` (empty is the home page, a number is the ID, otherwise `href`).

protected loadPageEntity() : Page|null

Returns null when the page does not exist; the 404 is decided by BasePresenter::startup(). The error page (ErrorPresenter) overrides the method because it has no page in the DB and the layout needs an entity.

Return values
Page|null

initializeExternalFiles()

private initializeExternalFiles(Page|null $pageEntity) : void
Parameters
$pageEntity : Page|null

initializeMetaTags()

private initializeMetaTags(Page|null $pageEntity) : void
Parameters
$pageEntity : Page|null
On this page

Search results