Class PageWidget

Description

This class is used to build content for an entire page. It uses the HTMLPageClass widget from phphtmllib to render the final output.

Located in Program_Root/widgets/PageWidget.inc (line 25)

HTMLPageClass
   |
   --PageWidget
Direct descendents
Class Description
MyLayoutPage This is an example Child of the PageWidget
Variable Summary
Method Summary
void PageWidget (mixed $title, [string $render_type = HTML], [int $indent_style = INDENT_NICE])
mixed. body_content ()
void enable_debug ([boolean $flag = TRUE])
void frameset ()
string get_title ()
mixed. head_content ()
string head_javascript ()
string render ()
Variables
mixed $_enable_debug = FALSE (line 35)

This enables the ability to view the source of a page bu setting debug=1 in the query string.

mixed $_title_text = NULL (line 43)

holds the page title text for

a page

Inherited Variables

Inherited from HTMLPageClass

HTMLPageClass::$_html_attributes
HTMLPageClass::$_indent_style
HTMLPageClass::$_widget_css_auto
HTMLPageClass::$_widget_js_auto
HTMLPageClass::$_xml_encoding
Methods
Constructor PageWidget (line 70)

Constructor:

void PageWidget (mixed $title, [string $render_type = HTML], [int $indent_style = INDENT_NICE])
  • mixed $title:

    - $title Title string or TITLEtag object for the page.

  • string $render_type:

    - one of 3 types of html to render. Setting this will make the object declare the gobal define which tells all of the tag objects what type of html tags to render. some tags support special features. such as the <IMG> tag. If xhtml is selected, the the IMGtag object and all utility functions will not render "border=0" as a default attribute, since this is not proper xhtml. "html" - HTML 4.0 (default) "xhtml_transitional" - render xhtml instead of html

    • doctype is XHTML transitional.
    "xhtml_strict" - render xhtml instead of html 4.0.
    • doctype is XHTML strict.

  • int $indent_style:

    - one of 2 types. INDENT_NICE or INDENT_LEFT_JUSTIFY This tells the page how to render the indenting of the output. By default it is set to INDENT_NICE, which nicely indents each nested tag. You can have all tags rendered left justified (smaller size in output) by using INDENT_LEFT_JUSTIFY

body_content (line 130)

This function is meant to be overridden by the child class.

This provides all of the content for the page. NOTE: You add the content to the body in 1 of 2 ways. 1) return the content from this call. 2) inside the call, you can just call $this->add(); and then return NULL;

mixed. body_content ()

Redefined in descendants as:
enable_debug (line 164)

This sets the debug option for the HTMLPageClass

void enable_debug ([boolean $flag = TRUE])
  • boolean $flag:

    TRUE for on, FALSE for off

frameset (line 141)

This function is used to save

a frameset to the page. This will automatically output a properly formatted

void frameset ()
get_title (line 89)

gets the current title of the page.

string get_title ()
head_content (line 110)

This function is used to build addition head content that isn't built by the HTMLPageClass parent class by default.

NOTE: you can add addition content to the head in 1 of 2 ways. 1) inside the call return the addition content in the return $foo; 2) or use the HTMLPageClass' $this->add_head_content() from within the head_content() call.

mixed. head_content ()
head_javascript (line 153)

This function is called to build any JavaScript that is needed in the <HEAD> portion of a document.

  • return:

    - the raw JS code to be put inside the <head>

string head_javascript ()
render (line 175)

This is the function that renders the HTML for this widget.

  • return:

    - the HTML

string render ()

Redefinition of:
HTMLPageClass::render()
render the page.

Inherited Methods

Inherited From HTMLPageClass

HTMLPageClass::HTMLPageClass()
HTMLPageClass::add()
HTMLPageClass::add_css_link()
HTMLPageClass::add_head_content()
HTMLPageClass::add_head_css()
HTMLPageClass::add_head_js()
HTMLPageClass::add_js_link()
HTMLPageClass::add_reference()
HTMLPageClass::build_doctype()
HTMLPageClass::get_html_attributes()
HTMLPageClass::push()
HTMLPageClass::push_css_link()
HTMLPageClass::push_head_content()
HTMLPageClass::push_head_js()
HTMLPageClass::push_js_link()
HTMLPageClass::push_reference()
HTMLPageClass::render()
HTMLPageClass::set_body_attributes()
HTMLPageClass::set_charset()
HTMLPageClass::set_encoding()
HTMLPageClass::set_frameset()
HTMLPageClass::set_html_attributes()
HTMLPageClass::set_language()
HTMLPageClass::set_refresh()
HTMLPageClass::set_text_debug()
HTMLPageClass::set_title()
HTMLPageClass::_build_content_type_tag()
HTMLPageClass::_build_head()
HTMLPageClass::_create_body()
HTMLPageClass::_frameset_wrap_body()

Documention generated on Thu, 31 Jul 2003 18:32:56 -0700 by phpDocumentor 1.2.0