Class OCSP_CMS_HTMLPAGE

Description

Class OCSP_CMS_PEARCACHE.phpclass

  • author: Peter Krebs <p.krebs@amicas.at>
  • version: $Id: OCSP_HTMLPAGE.phpclass,v 1.27 2008/12/10 15:39:05 peterkrebs Exp $
  • since: pk-07-06-07
  • project: Open CSP-Management
  • license: GNU Public License

Located in /cms/OCSP_CMS_HTMLPAGE.phpclass (line 50)

OCSP_HTMLPAGE
   |
   --OCSP_CMS_HTMLPAGE
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static OCSP_CMS_HTMLPAGE &factoryFromEnv ([boolean $debug = False])
 static OCSP_CMS_HTMLPAGE factoryFromPage ( &$aPage, [boolean $debug = False], CMS_PAGE $aPage)
 static CMS_PAGE &getCurrentPage ( $debug)
 static OCSP_CMS_HTMLPAGE &getInstance (mixed $aPage, [boolean $debug = False])
 static boolean isInstanced (int $aPageId)
 void addBodyContentPage (CMS_PAGE_V2 $aPage, [int $chapterMode = 0], [boolean $prepend = False], [string $blockName = 'DEFAULT'], [boolean $debug = False])
 OCSP_CMS_HTMLPAGE OCSP_CMS_HTMLPAGE ( &$aPage, [boolean $debug = False], CMS_PAGE_V2 $aPage)
 boolean cmsCacheIsUsable ()
 boolean curUserCanOpen ([boolean $debug = False])
 void display ([boolean $closeBody = true], [string $convertCharSet = "UTF-8"], [ $debug = False])
 void displayErrorPage (string $errorMsg)
 boolean getPreviewMode ()
 boolean populateHTML_Head ([boolean $debug = False])
 void prepare ([unknown_type $debug = False])
 void setPreviewMode ([boolean $on = True])
Variables
static mixed $loaded_CMS_HTML_Pages = array() (line 70)

unit of work array of instances

  • staticvar: array $myCMSPageInstances:
  • access: protected
string $myJsOnError = "
window.onerror=ocsp_handleErr;
var ocsp_handleErrDebug=true;

function ocsp_handleErr(msg,url,l)
{
var txt=\"\";
txt =\"There was an error on this page.\\n\\n\";
txt+=\"Error: \" + msg + \"\\n\";
txt+=\"URL: \" + url + \"\\n\";
txt+=\"Line: \" + l + \"\\n\\n\";
txt+=\"Click OK to continue.\\n\\n\";
if (ocsp_handleErrDebug) alert(txt);
return true;
}
"
(line 183)
  • access: protected

Redefinition of:
OCSP_HTMLPAGE::$myJsOnError
CMS_MENU_NODE $myMenuNode = Null (line 170)
  • access: protected
CMS_PAGE $myPageObj = Null (line 164)
  • access: protected
CMS_PROJECT $myProject = Null (line 175)
  • access: protected

Redefinition of:
OCSP_HTMLPAGE::$myProject
boolean $previewMode = False (line 205)

preview mode

  • access: protected

Inherited Variables

Inherited from OCSP_HTMLPAGE

OCSP_HTMLPAGE::$myAjaxObj
OCSP_HTMLPAGE::$myBodyBlocks
OCSP_HTMLPAGE::$myBodyContent
OCSP_HTMLPAGE::$myBodyOnload
OCSP_HTMLPAGE::$myBodyTag
OCSP_HTMLPAGE::$myCSS_code
OCSP_HTMLPAGE::$myCSS_includes
OCSP_HTMLPAGE::$myDocType
OCSP_HTMLPAGE::$myHeadContent
OCSP_HTMLPAGE::$myHtmlTag
OCSP_HTMLPAGE::$myHTTP_headers
OCSP_HTMLPAGE::$myJS_code
OCSP_HTMLPAGE::$myJS_includes
OCSP_HTMLPAGE::$myMetaTags
OCSP_HTMLPAGE::$myTemplateVars
OCSP_HTMLPAGE::$myTitle
Methods
static factoryFromEnv (line 221)

factories the html page from the environment

  • since: pk-08-11-30
  • access: public
OCSP_CMS_HTMLPAGE &factoryFromEnv ([boolean $debug = False])
  • boolean $debug
static factoryFromPage (line 263)

factories a html page from a cms page object

  • access: public
OCSP_CMS_HTMLPAGE factoryFromPage ( &$aPage, [boolean $debug = False], CMS_PAGE $aPage)
  • CMS_PAGE $aPage
  • boolean $debug
  • &$aPage
static getCurrentPage (line 79)

returns the current html page object

  • access: public
CMS_PAGE &getCurrentPage ( $debug)
  • $debug
static getInstance (line 120)

returns the instance for $aPage

NOTE you can pass either the pageId or the page object

  • access: public
OCSP_CMS_HTMLPAGE &getInstance (mixed $aPage, [boolean $debug = False])
  • mixed $aPage
  • boolean $debug
static isInstanced (line 105)

returns if a page is already instanced

  • access: public
boolean isInstanced (int $aPageId)
  • int $aPageId
addBodyContentPage (line 355)

adds a body content (to a block)

if the blockname ends with [] the content is treaten as array in this case prepend is disabled

  • todo: OCSP_HTMLPAGE::prepend in array mode
  • access: public
void addBodyContentPage (CMS_PAGE_V2 $aPage, [int $chapterMode = 0], [boolean $prepend = False], [string $blockName = 'DEFAULT'], [boolean $debug = False])
  • CMS_PAGE_V2 $aPage
  • int $chapterMode
  • boolean $prepend
  • string $blockName
  • boolean $debug
Constructor OCSP_CMS_HTMLPAGE (line 277)
OCSP_CMS_HTMLPAGE OCSP_CMS_HTMLPAGE ( &$aPage, [boolean $debug = False], CMS_PAGE_V2 $aPage)
cmsCacheIsUsable (line 384)

returns if the cms cache is usable

if (_OCSP_USEPEARCACHE_) it's ensured that $GLOBALS['OCSP_OBJ']['CMS_PEARCHACHE'] is an object

boolean cmsCacheIsUsable ()
curUserCanOpen (line 533)

returns if the current user can open the page

  • access: public
boolean curUserCanOpen ([boolean $debug = False])
  • boolean $debug
display (line 475)

outputs the page

  • version: pk-07-12-14 gzip return
void display ([boolean $closeBody = true], [string $convertCharSet = "UTF-8"], [ $debug = False])
  • boolean $closeBody
  • string $convertCharSet
  • $debug

Redefinition of:
OCSP_HTMLPAGE::display()
outputs the page
displayErrorPage (line 507)

outputs an error page

  • todo: make layout
  • access: public
void displayErrorPage (string $errorMsg)
  • string $errorMsg
getPageObj (line 310)

returns the page object

  • access: public
CMS_PAGE getPageObj ()
getPreviewMode (line 320)

returns if preview is on

  • access: public
boolean getPreviewMode ()
populateHTML_Head (line 413)

sets the html header form the page note clears all previous settings

  • access: public
boolean populateHTML_Head ([boolean $debug = False])
  • boolean $debug
prepare (line 446)

loads the required templates and sets the template vars

  • access: public
void prepare ([unknown_type $debug = False])
  • unknown_type $debug
setPreviewMode (line 330)

sets preview mode

  • access: public
void setPreviewMode ([boolean $on = True])
  • boolean $on

Inherited Methods

Inherited From OCSP_HTMLPAGE

 OCSP_HTMLPAGE::OCSP_HTMLPAGE()
 OCSP_HTMLPAGE::addBodyContent()
 OCSP_HTMLPAGE::addBodyContentFile()
 OCSP_HTMLPAGE::addBodyOnload()
 OCSP_HTMLPAGE::addCssCode()
 OCSP_HTMLPAGE::addCssSrcLink()
 OCSP_HTMLPAGE::addHeadContent()
 OCSP_HTMLPAGE::addHeadContentFile()
 OCSP_HTMLPAGE::addJsCode()
 OCSP_HTMLPAGE::addJsFile()
 OCSP_HTMLPAGE::addJsSrcLink()
 OCSP_HTMLPAGE::appendHTTP_header()
 OCSP_HTMLPAGE::clearHTTP_header()
 OCSP_HTMLPAGE::display()
 OCSP_HTMLPAGE::getAjaxObj()
 OCSP_HTMLPAGE::getBodyContent()
 OCSP_HTMLPAGE::getBodyOnLoad()
 OCSP_HTMLPAGE::getHtmlHead()
 OCSP_HTMLPAGE::getTemplateVar()
 OCSP_HTMLPAGE::parseTemplateVar()
 OCSP_HTMLPAGE::setAjaxObj()
 OCSP_HTMLPAGE::setBodyOnload()
 OCSP_HTMLPAGE::setBodyTag()
 OCSP_HTMLPAGE::setDocType()
 OCSP_HTMLPAGE::setJsOnErrorCode()
 OCSP_HTMLPAGE::setMetaData()
 OCSP_HTMLPAGE::setTemplateVar()
 OCSP_HTMLPAGE::setTitle()
 OCSP_HTMLPAGE::toHtml()
 OCSP_HTMLPAGE::URI_changeGetValue()
Class Constants
CLASS_SRC_FILE = __FILE__ (line 59)

Inherited Constants

Inherited from OCSP_HTMLPAGE

OCSP_HTMLPAGE::CLASS_SRC_FILE

Documentation generated on Thu, 08 Jan 2009 17:45:16 +0100 by phpDocumentor 1.4.0a2