Manages HTML pages and provides functions for rendering them
__construct(string $pagename, string $pluginname, string $submenu)
It will also add every script in the form of /scripts/.PAGENAME.js and every stylesheet in the form of/styles/.PAGENAME.css to the page as well as /scripts/PAGENAME.js and /styles/PAGENAME.css.
string
The name of the page which will be used to load corresponding stylehseets, templates and scripts.
string
The name of the plugin in which the site is run
string
The number of the submenu which should be highlighted when this page is shown.
abortRendering()
NOTE: You still have to call render() to actually show any messages
addMeta(array $meta) : void
array
Associative array with the meta tag attributes
\cInvalidArgumentException |
if an invalid attribute for the meta tag has been given |
---|
addScript(string $script)
NOTE: This function will also add inline JavaScript in the form of "<script...". However this shouldn't be used.
string
The filename of the script. It has to reside in /scripts/ in order to be found.
addStyle(string $stylesheet)
string
The filename of the stylesheet. It has to reside in /styles/ in order to be found.
appendContent(array | object $objects)
NOTE: All these objects must have a render() method or else they won't be shown
array
object
An array of objects or a single object
displayCriticalError(string $msg)
string
A message
displayError(string $msg)
string
A message
displayInfo(string $msg)
string
The info message
displayWarning(string $msg)
string
The warning
render(\Template | null $template, bool $return) : string
bool
If true, the page will be returned instead of echoed
string
void either the webpage or nothingset(string $type, string $key, string $value)
see | \cTemplate::set() |
---|
string
Either "s" or "d" for "static" or "dynamic" values
string
The key which should be replaced
string
The value which should replace the key
setContent(array | object $objects)
NOTE: All these objects must have a render() method or else they won't be shown
array
object
An array of objects
setEncoding(string $encoding)
string
An encoding which should be valid to use in the meta tag
setMarkScript(string $item)
string
The number of the submenu which should be marked.
setPluginScript(\unknown_type $plugin, \unknown_type $filename) : \Ambigous
\unknown_type
\unknown_type
\Ambigous
setReload()
setStyleDirect($filepath)
setSubnav(string $additional, string $aarea)
string
Additional parameters the subnavigation might need. These have to look like "key=value&key2=value2..."
string
The area of the subnavigation. If none is given the current area will be loaded
$_abort : bool
$_contenttemplate : \cTemplate
(Usually template.PAGENAME.html)
$_error : string
$_info : \unknown_type
$_markscript : string
This will be included in the final page.
$_objects : array
$_pagename : string
This will be used to load the template, stylesheets and scripts.
$_pagetemplate : \cTemplate
$_pluginname : string
$_scripts : array
$_styles : array
$_warning : string