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:
-
contents
StringThe HTML page contents
Returns:
The updated page contents
addPageContent
-
page
Generate the page content
Parameters:
-
page
PageThe page object
Returns:
The updated page object
buildTime
-
isAsync
Get the current build time
Parameters:
-
isAsync
BooleanIf 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:
-
id
IntThe page ID to search for
Returns:
The site page matching the ID
getPageByUri
-
uri
Search a page by a uri
Parameters:
-
uri
StringThe 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:
-
content
StringThe string to parse
-
substitutions
DictionaryThe dictionary of tags to replace
Returns:
The parsed string
service
-
alias
Get a service by alias
Parameters:
-
alias
StringThe alias
Returns:
The service matching the alias
setPageTitle
-
page
Construct the 'pageTitle' and 'fullTitle' render settings
Parameters:
-
page
PageThe page
Properties
parser
Parser
The parser is responsible for rendering templates
profiler
Profiler
The instance of the profiler for debugging performance