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.
stringThe name of the page which will be used to load corresponding stylehseets, templates and scripts.
stringThe name of the plugin in which the site is run
stringThe 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
arrayAssociative 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.
stringThe filename of the script. It has to reside in /scripts/ in order to be found.
addStyle(string $stylesheet)
stringThe 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
arrayobjectAn array of objects or a single object
displayCriticalError(string $msg)
stringA message
displayError(string $msg)
stringA message
displayInfo(string $msg)
stringThe info message
displayWarning(string $msg)
stringThe warning
render(\Template | null $template, bool $return) : string
boolIf true, the page will be returned instead of echoed
stringvoid either the webpage or nothingset(string $type, string $key, string $value)
| see | \cTemplate::set() |
|---|
stringEither "s" or "d" for "static" or "dynamic" values
stringThe key which should be replaced
stringThe 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
arrayobjectAn array of objects
setEncoding(string $encoding)
stringAn encoding which should be valid to use in the meta tag
setMarkScript(string $item)
stringThe number of the submenu which should be marked.
setPluginScript(\unknown_type $plugin, \unknown_type $filename) : \Ambigous
\unknown_type
\unknown_type
\AmbigoussetReload()
setStyleDirect($filepath)
setSubnav(string $additional, string $aarea)
stringAdditional parameters the subnavigation might need. These have to look like "key=value&key2=value2..."
stringThe 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