PageBuilder Class
Responsible for building the pages and handling page requests. Located in the namespace PageBuilder.
Item Index
Methods
Properties
- _indexPage
- _isGateway
- _pages
- cache
- DATA_CONTEXT static
- parser
- profiler
- RENDER_CONTEXT static
- settings
- site
- user
Methods
addLoggerProfiler
-
contents
Add the logger and profiler to the output
Parameters:
-
contentsStringThe HTML page contents
Returns:
The updated page contents
addPageContent
-
page
Generate the page content
Parameters:
-
pagePageThe page object
Returns:
The updated page object
buildTime
-
isAsync
Get the current build time
Parameters:
-
isAsyncBooleanIf the request is made asyncronously
Returns:
The build time HTML comment
flush
()
private
Clear both the render and data page caches
getPage
-
id
Search a page by a uri
Parameters:
-
idIntThe page ID to search for
Returns:
The site page matching the ID
getPageByUri
-
uri
Search a page by a uri
Parameters:
-
uriStringThe page URI
Returns:
The page matching the URI
getSettings
()
String
private
Generate a list of settings to use
Returns:
HTML Script tag containing all the Canteen and custom settings
handlePage
-
uri -
isAsync
Render current page
Parameters:
Returns:
Page rendering
parse
-
content -
substitutions
Convenience method for parsing content
Parameters:
-
contentStringThe string to parse
-
substitutionsDictionaryThe dictionary of tags to replace
Returns:
The parsed string
service
-
alias
Get a service by alias
Parameters:
-
aliasStringThe alias
Returns:
The service matching the alias
setPageTitle
-
page
Construct the 'pageTitle' and 'fullTitle' render settings
Parameters:
-
pagePageThe page
Properties
parser
Parser
The parser is responsible for rendering templates
profiler
Profiler
The instance of the profiler for debugging performance
