Methods summary
public
|
#
__construct( string $pagename, string $pluginname = "", string $submenu = "" )
The constructor initializes the class and tries to get the encoding from the
currently selected language. 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.
The constructor initializes the class and tries to get the encoding from the
currently selected language. 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.
Parameters
- $pagename
string $pagename The name of the page which will be used to load corresponding
stylehseets, templates and scripts.
- $pluginname
string $pluginname The name of the plugin in which the site is run
- $submenu
string $submenu The number of the submenu which should be highlighted when this page is
shown.
|
public
|
#
addScript( string $script )
Adds a script to the website - path can be absolute, relative to the plugin
scripts folder and relative to the CONTENIDO scripts folder. NOTE: This function
will also add inline JavaScript in the form of "<script...". However this
shouldn't be used.
Adds a script to the website - path can be absolute, relative to the plugin
scripts folder and relative to the CONTENIDO scripts folder. NOTE: This function
will also add inline JavaScript in the form of "<script...". However this
shouldn't be used.
If the page was constructed in a plugin and the plugin name was given in the
constructor it will find the JS script in plugins/PLUGINNAME/scripts/ too.
Parameters
- $script
string $script The filename of the script. It has to reside in /scripts/ in order to be
found.
|
public
|
#
addStyle( string $stylesheet )
Adds a stylesheet to the website - path can be absolute, relative to the
plugin stylesheets folder and relative to the CONTENIDO stylesheets folder.
Adds a stylesheet to the website - path can be absolute, relative to the
plugin stylesheets folder and relative to the CONTENIDO stylesheets folder.
Parameters
- $stylesheet
string $stylesheet The filename of the stylesheet. It has to reside in /styles/ in
order to be found.
|
public
|
#
addMeta( array $meta )
Adds a meta tag to the website.
Adds a meta tag to the website.
Parameters
- $meta
array $meta Associative array with the meta tag attributes
Throws
|
public
|
#
setSubnav( string $additional = "", string $aarea = "" )
Loads the subnavigation of the current area upon rendering.
Loads the subnavigation of the current area upon rendering.
Parameters
- $additional
string $additional Additional parameters the subnavigation might need. These have to
look like "key=value&key2=value2..."
- $aarea
string $aarea The area of the subnavigation. If none is given the current area will be
loaded
|
public
|
#
setReload( )
Adds the reload script for the left_bottom frame to the website
Adds the reload script for the left_bottom frame to the website
|
public
|
#
setMarkScript( string $item )
Sets the markscript
Parameters
- $item
string $item The number of the submenu which should be marked.
|
public
|
#
setEncoding( string $encoding )
Sets the encoding of the website
Sets the encoding of the website
Parameters
- $encoding
string $encoding An encoding which should be valid to use in the meta tag
|
public
|
#
set( string $type, string $key, string $value )
Applies a value to a key in the content template.
Applies a value to a key in the content template.
Parameters
- $type
string $type Either "s" or "d" for "static" or "dynamic" values
- $key
string $key The key which should be replaced
- $value
string $value The value which should replace the key
See
|
public
|
#
next( )
Calls the next() method on the content template.
Calls the next() method on the content template.
See
|
public
|
#
abortRendering( )
After calling this the page will only display messages and not render the
content template. NOTE: You still have to call render() to actually show any
messages
After calling this the page will only display messages and not render the
content template. NOTE: You still have to call render() to actually show any
messages
|
public
|
#
displayCriticalError( string $msg )
Displays an error message and aborts rendering after that NOTE: You still
have to call render() to actually show any messages
Displays an error message and aborts rendering after that NOTE: You still
have to call render() to actually show any messages
Parameters
- $msg
string $msg A message
|
public
|
#
displayError( string $msg )
Displays an error but the rendering of the content template will
continue.
Displays an error but the rendering of the content template will
continue.
Parameters
- $msg
string $msg A message
|
public
|
#
displayWarning( string $msg )
Displays a warning
Parameters
- $msg
string $msg The warning
|
public
|
#
displayInfo( string $msg )
Displays an info
Parameters
- $msg
string $msg The info message
|
public
|
#
setContent( array|object $objects )
Sets an array (or a single object) of cHTML objects which build up the site
instead of a content template. NOTE: All these objects must have a render()
method or else they won't be shown
Sets an array (or a single object) of cHTML objects which build up the site
instead of a content template. NOTE: All these objects must have a render()
method or else they won't be shown
Parameters
- $objects
array|object $objects An array of objects
|
public
|
#
appendContent( array|object $objects )
Appends all cHTML objects in an array (or a single object) which build up the
site instead of a content template. NOTE: All these objects must have a render()
method or else they won't be shown
Appends all cHTML objects in an array (or a single object) which build up the
site instead of a content template. NOTE: All these objects must have a render()
method or else they won't be shown
Parameters
- $objects
array|object $objects An array of objects or a single object
|
public
Ambigous
|
#
setPluginScript( unknown_type $plugin, unknown_type $filename )
Example: setPluginScript('content_allocation', 'complexlist.js');
$this->_scripts[] =
'http://contenido.local/contenido/plugins/content_allocation/scripts/complexlist.js';
Example: setPluginScript('content_allocation', 'complexlist.js');
$this->_scripts[] =
'http://contenido.local/contenido/plugins/content_allocation/scripts/complexlist.js';
Parameters
- $plugin
unknown_type $plugin
- $filename
unknown_type $filename
Returns
Ambigous <string, mixed>
|
public
|
|
public
string
|
#
render( Template|null $template = NULL, boolean $return = false )
Renders the page and either prints it or returns it
Renders the page and either prints it or returns it
Parameters
- $template
Template|null $template If set, use this content template instead of the default one
- $return
boolean $return If true, the page will be returned instead of echoed
Returns
string void either the webpage or nothing
|
Properties summary
protected
string
|
$_pagename
|
|
#
The name of the page. This will be used to load the template, stylesheets and
scripts.
The name of the page. This will be used to load the template, stylesheets and
scripts.
|
protected
string
|
$_pluginname
|
|
#
The name of the plugin of the current webpage.
The name of the plugin of the current webpage.
|
protected
cTemplate
|
$_pagetemplate
|
|
#
The general page template.
The general page template.
|
protected
cTemplate
|
$_contenttemplate
|
|
#
The template for everything that is inside the body. (Usually
template.PAGENAME.html)
The template for everything that is inside the body. (Usually
template.PAGENAME.html)
|
protected
array
|
$_scripts
|
|
#
An array of script names (inside /scripts/) which will be included in the
final page.
An array of script names (inside /scripts/) which will be included in the
final page.
|
protected
array
|
$_styles
|
|
#
An array of stylesheets (inside /styles/) which will be included in the final
page.
An array of stylesheets (inside /styles/) which will be included in the final
page.
|
protected
string
|
$_subnav
|
|
#
The script to set the subnavigation. This will be included in the final
page.
The script to set the subnavigation. This will be included in the final
page.
|
protected
string
|
$_markscript
|
|
#
The script to markup the current submenu item. This will be included in the
final page.
The script to markup the current submenu item. This will be included in the
final page.
|
protected
string
|
$_error
|
|
#
An error message which will be used to display an error with the help of
cGuiNotification
An error message which will be used to display an error with the help of
cGuiNotification
|
protected
string
|
$_warning
|
|
#
A warning which will be used to display an error with the help of
cGuiNotification
A warning which will be used to display an error with the help of
cGuiNotification
|
protected
unknown_type
|
$_info
|
|
#
An info which will be used to display an error with the help of
cGuiNotification
An info which will be used to display an error with the help of
cGuiNotification
|
protected
boolean
|
$_abort
|
|
#
If true, just display the message and don't render the template
If true, just display the message and don't render the template
|
protected
array
|
$_objects
|
|
#
An array of cHTML objects which will be rendered instead of filling a
template.
An array of cHTML objects which will be rendered instead of filling a
template.
|
protected
array
|
$_metaTags
|
|
#
Array of arrays where each array contains information about a meta tag.
Array of arrays where each array contains information about a meta tag.
|