Class cGuiPage
Generic page GUI class. Manages HTML pages and provides functions for rendering them.
Direct known subclasses
ArticleForumLeftBottom, ArticleForumRightBottom, SolrRightBottomPage, cGuiFileOverview, cGuiSourceEditor, PifaLeftBottomPage, PifaRightBottomFormDataPage, PifaRightBottomFormExportPage, PifaRightBottomFormFieldsPage, PifaRightBottomFormImportPage, PifaRightBottomFormPageCopyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Mischa Holz
Located at classes/gui/class.page.php
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. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
reloadFrame( string $frameName, string|array $updatedParameters = null )
Adds JavaScript to the page to reload a certain frame. |
public
|
|
public
|
|
public
|
|
public
|
#
setPageBase( string $filename = '' )
Function to specify the file used to generate the page template |
public
|
|
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 |
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 |
public
|
#
displayError( string $msg )
Displays an error but the rendering of the content template will continue. |
public
|
|
public
|
|
public
|
|
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 |
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 |
public
string|
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
#
_renderContentMessages( )
Renders text for all available content messages and returns the assembled message string. |
protected
string
|
#
_renderObjects( )
Loops through all defined objects, calls their render function, collects the output of the objects and returns it back. |
protected
string
|
#
_renderTemplate(
Renders template of a page or of a plugin and returns the output back |
protected
string
|
#
_getRealFilePathName( string $file )
Returns only the path and name of the given file. Some JS or CSS file URLs may contain a query part, like "/path/to/file.js.php?contenido=12234" and this function returns only the path part "/path/to/file.js.php" of it. |
protected
string
|
$_pageName |
|
#
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. |
protected
|
$_pageTemplate |
|
#
The general page template. |
protected
string
|
$_pageBase |
|
#
The file used generate the page |
protected
|
$_contentTemplate |
|
#
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. |
protected
array
|
$_styles |
|
#
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. |
protected
string
|
$_markScript |
|
#
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 |
protected
string
|
$_warning |
|
#
A warning which will be used to display an error with the help of cGuiNotification |
protected
string
|
$_info |
|
#
An info which will be used to display an error with the help of cGuiNotification |
protected
string
|
$_ok |
|
#
A ok 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 |
protected
array
|
$_objects |
|
#
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. |
protected
array
|
$_bodyClassNames |
|
#
Array of class attribute values for body tag. |
protected
string
|
$_filesDirectory |
|
#
Scripts and styles subfolder for cGuiPage objects |
protected
boolean
|
$_skipTemplateCheck | false |
#
Whether the template exist check should be skipped or not. |