PageView Class Reference

Inheritance diagram for PageView:
View ZurmoPageView AccessFailurePageView ErrorPageView InstallAccessFailurePageView InstallPageView LoginPageView MarketingListsExternalActionsPageView MarketingListsManageSubscriptionsPageView ModelNotFoundPageView UnsupportedBrowserPageView ViewIsMissingRequiredAttributesPageView ZurmoDefaultPageView ZurmoExternalDefaultPageView

Public Member Functions

 __construct (View $containedView)
 render ()
 appendContentBeforeXHtmlBodyEndAndXHtmlEnd ($content, $additionalContent)

Static Public Member Functions

static validate ($content)
static schemeValidationErrorHandler ($errno, $errstr, $errfile, $errline)
static makeNonHtmlDuplicateCountAndQueryContent ()
static registerAllPagesScriptFiles ()
static getScriptFilesThatLoadOnAllPages ()

Static Public Attributes

static $foundErrors = false
static $xhtmlValidationErrors = array()

Protected Member Functions

 renderContent ()
 renderXHtmlStart ()
 renderXHtmlBeforeBodyEnd ()
 renderXHtmlHead ()
 getSubtitle ()
 getStyles ()
 renderXHtmlBodyStart ()
 renderXHtmlBodyEnd ()
 renderXHtmlEnd ()

Detailed Description

The view that forms the basis of every page. It renders the XHtml html, header, body, etc, and renders its contained view within the body. After rending the page and before returning it it validates the XHtml against the XHtml schema and renders directly to the browser any errors it finds before returning the rendered page to the caller.

Definition at line 45 of file PageView.php.


Constructor & Destructor Documentation

__construct ( View containedView  ) 

Constructs the page view specifying the view that it will contain.

Reimplemented in InstallPageView, ModelNotFoundPageView, AccessFailurePageView, ViewIsMissingRequiredAttributesPageView, ZurmoDefaultPageView, and ZurmoExternalDefaultPageView.

Definition at line 60 of file PageView.php.


Member Function Documentation

render (  ) 

Renders a div element with a id or class attribute set to the type of the view, (depending on the value returned by isUniqueToAPage()), and containing the content of any matching template found in the themes/<themename>/ directory if it exists, marked by begin/end comments, and the content of the view rendered by renderContent(). All are correctly indented by indent().

If the template does not exist in the active theme folder, it will attempt to locate the file in the themes/default/templates folder and include it if it exists.

Reimplemented from View.

Reimplemented in ZurmoExternalDefaultPageView.

Definition at line 65 of file PageView.php.

static validate ( content  )  [static]

Validates the page content against the XHTML schema and writes the problems directly to output in bright red on yellow. Is public for access by unit tests.

Definition at line 107 of file PageView.php.

static schemeValidationErrorHandler ( errno,
errstr,
errfile,
errline 
) [static]

Error handler that writes the errors directly to output in bright red on yellow.

Definition at line 144 of file PageView.php.

renderContent (  )  [protected]

Renders the view content.

Reimplemented from View.

Reimplemented in InstallPageView.

Definition at line 158 of file PageView.php.

renderXHtmlStart (  )  [protected]

Renders the xml declaration, doctype, and the html start tag.

Definition at line 166 of file PageView.php.

renderXHtmlBeforeBodyEnd (  )  [protected]

Renders the XHtml before the ending body tag

Definition at line 202 of file PageView.php.

renderXHtmlHead (  )  [protected]

Renders the XHtml header element containing the title and the default stylesheets screen, print, and ie. Additional stylesheets can be specified by overriding getStyles() in the extending class.

Reimplemented in ZurmoExternalDefaultPageView.

Definition at line 213 of file PageView.php.

getStyles (  )  [protected]

Returns an empty array of styles, being the names of stylesheets without a css extention. Can be overridden in the extending class to specify stylesheets additional to those rendered by default.

See also:
renderXHtmlHead()

Reimplemented in ZurmoPageView.

Definition at line 328 of file PageView.php.

renderXHtmlBodyStart (  )  [protected]

Renders the body start tag.

Definition at line 336 of file PageView.php.

renderXHtmlBodyEnd (  )  [protected]

Renders the body end tag.

Definition at line 354 of file PageView.php.

renderXHtmlEnd (  )  [protected]

Renders the html end tag.

Definition at line 362 of file PageView.php.

static registerAllPagesScriptFiles (  )  [static]

Register into clientScript->scriptFiles any scripts that should load on all pages

See also:
getScriptFilesThatLoadOnAllPages

Definition at line 382 of file PageView.php.

static getScriptFilesThatLoadOnAllPages (  )  [static]
Returns:
array of script files that are loaded on all pages
See also:
registerAllPagesScriptFiles

Definition at line 392 of file PageView.php.

appendContentBeforeXHtmlBodyEndAndXHtmlEnd ( content,
additionalContent 
)

Add additional html conent before html body end("</body>") tag and html end tag ("</html>")

Parameters:
string $content
string $additionalContent
Returns:
string

Definition at line 412 of file PageView.php.


Field Documentation

$foundErrors = false [static]

Flags that the error handler was called.

Definition at line 50 of file PageView.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sun Sep 22 07:11:05 2019