NavXMLModule Class Reference

Produces XML that can be rendered as PR2 navigation. More...

List of all members.

Public Member Functions

 __construct ()
 Create a NavXMLModule to generate the navigation for a page.
 addLevel ()
 Add a level tag to the levels buffer, containing a set of links.
 addLink ($name, $link)
 Add a link to the current level's list of links.
 addLinkLevel ($name, $link)
 Add a link/path level to the set of breadcrumbs.
 addTab ($name, $link)
 Add a tab to the current row.
 addTabRow ()
 Finish a row of tabs.
 generateBasePathXML ()
 Generate the root level breadcrumbs XML.
 generateBrowseXML ()
 Generate the Browse XML.
 generateJumpToXML ()
 Generate the Jump-To XML.
 generateSearchXML ()
 Generate the Search XML.
 generateXML ()
 Generate the PR2-ready navigation XML string.


Detailed Description

Produces XML that can be rendered as PR2 navigation.

This class builds the XML that is translated by PR2 to generate all forms of site navigation.

Author:
Jonathan (jwsm@shodor.org)
Date:
Sometime in 05-06

Definition at line 15 of file NavXMLModule.php5.


Member Function Documentation

NavXMLModule::addLevel (  ) 

Add a level tag to the levels buffer, containing a set of links.

For internal use only.

Definition at line 90 of file NavXMLModule.php5.

Referenced by addLinkLevel().

NavXMLModule::addLink ( name,
link 
)

Add a link to the current level's list of links.

For internal use only.

Parameters:
$name [string]: The display text for the link
$link [string]: The URL of the link

Definition at line 107 of file NavXMLModule.php5.

Referenced by addLinkLevel().

NavXMLModule::addLinkLevel ( name,
link 
)

Add a link/path level to the set of breadcrumbs.

Parameters:
$name [string]: The text to appear for the breadcrumb
$link [string]: The URL link for the breadcrumb

Definition at line 122 of file NavXMLModule.php5.

References addLevel(), and addLink().

NavXMLModule::addTab ( name,
link 
)

Add a tab to the current row.

Parameters:
$name [string]: The text to appear on the tab
$link [string]: The URL to which the tab should link

Definition at line 148 of file NavXMLModule.php5.

NavXMLModule::addTabRow (  ) 

Finish a row of tabs.

Use this function after you have finished adding a row of tabs, having called addTab() to create those tabs.

Definition at line 133 of file NavXMLModule.php5.

NavXMLModule::generateBasePathXML (  ) 

Generate the root level breadcrumbs XML.

For internal use only.

Returns:
[string]: XML of the root level 'level' tag

Definition at line 39 of file NavXMLModule.php5.

Referenced by generateXML().

NavXMLModule::generateBrowseXML (  ) 

Generate the Browse XML.

Returns:
[string]: The section of the XML describing the Browse menu
This function should be overridden in your project's site navigation object (which should extend this class). That child object should return the browse XML specific to your project.

Definition at line 166 of file NavXMLModule.php5.

Referenced by generateXML().

NavXMLModule::generateJumpToXML (  ) 

Generate the Jump-To XML.

Returns:
[string]: The section of the XML describing the Jump-To menu
This function should be overridden in your project's site navigation object (which should extend this class). That child object should return the jump-to XML specific to your project.

Definition at line 180 of file NavXMLModule.php5.

Referenced by generateXML().

NavXMLModule::generateSearchXML (  ) 

Generate the Search XML.

Returns:
[string]: The section of the XML describing the Search menu
This function should be overridden in your project's site navigation object (which should extend this class). That child object should return the search XML specific to your project.

Definition at line 194 of file NavXMLModule.php5.

Referenced by generateXML().

NavXMLModule::generateXML (  ) 

Generate the PR2-ready navigation XML string.

Returns:
[string]: Navigation XML
This function calls generateBrowseXML(), generateJumpToXML(), and generateSearchXML(), as well as fetching the path and tabs XML that has already been generated for this object through calls to addLinkLevel(), addTab(), and addTabRow(). All of this XML is combined and returned by this function.

Definition at line 59 of file NavXMLModule.php5.

References generateBasePathXML(), generateBrowseXML(), generateJumpToXML(), and generateSearchXML().


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:05:53 2010 for Common by  doxygen 1.5.6