Class HtmlPage
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:
Creates an Admidio specific complete html page
This class creates a html page with head and body and integrates some Admidio specific elements like css files, javascript files and javascript code. It also provides some methods to easily add new html data to the page. The generated page will automatically integrate the choosen theme. You can optional disable the integration of the theme files.
Class: HtmlPage
Code:
// create a simple html page with some text $page = new HtmlPage(); $page->addJavascriptFile('adm_program/libs/jquery/jquery.min.js'); $page->setHeadline('A simple Html page'); $page->addHtml('This is a simple Html page!'); $page->show(); @endcode
Par: Examples
Located at htmlpage.php
Methods summary
public
|
#
__construct( string $headline = '' )
Constructor creates the page object and initialized all parameters |
public
|
|
public
|
|
public
|
|
public
|
#
addJavascript( string $javascriptCode, boolean $executeAfterPageLoad = false )
Adds any javascript content to the page. The javascript will be added in the order you call this method. |
public
|
|
public
|
|
public
|
|
public
|
|
private
string
|
#
getDebugOrMinFilepath( string $filepath )
The method will return the filename. If you are in debug mode than it will return the not minified version of the filename otherwise it will return the minified version. Therefore you must provide 2 versions of the file. One with a @b min before the file extension and one version without the @b min. |
public
string
|
#
getHeadline( )
Returns the headline of the current Admidio page. This is the text of the < h1> tag of the page. |
public
|
|
public
string
|
|
public
|
|
public
|
#
hideThemeHtml( )
Every html page of Admidio contains three files of the custom theme. my_header.php, my_body_top.php and my_body_bottom.php With these files the administrator can contain custom layout to Admidio. If these files should not be included in the current page, than this method must be called. |
public
|
|
public
|
#
setHeadline( string $headline )
Set the h1 headline of the current html page. If the title of the page was not set until now than this will also be the title. |
public
|
#
setPrintMode( )
If print mode is set then a print specific css file will be loaded. All styles will be more print compatible and are only black, grey and white. |
public
|
|
public
string|
|
Properties summary
protected
|
$title
|
|
protected
|
$header
|
|
protected
|
$headline
|
|
protected
|
$pageContent
|
|
protected
|
$menu
|
|
protected
|
$showThemeHtml
|
|
protected
|
$showMenu
|
|
protected
|
$hasNavbar
|
|
protected
|
$showModal
|
|
protected
|
$cssFiles
|
|
protected
|
$jsFiles
|
|
protected
|
$rssFiles
|
|
protected
|
$printMode
|
|
protected
|
$javascriptContent
|
|
protected
|
$javascriptContentExecute
|