registry =& $registry; } // ################################################################### /** * (PHP 4) Constructor */ function Printer_Navigation(&$registry) { $this->__construct($registry); } // ################################################################### /** * Adds a global link to the array; these cannot be removed once added * * @access public * * @param string Link text * @param string HREF of the URL */ function add_top_link($text, $href) { $this->toplinks["$href"] = $text; } // ################################################################### /** * Adds to the structure array. The following is the global structure * of the array, but you can specify any entry point. When you add onto * the structure, it will go at the bottom * array( * 'unique_key' => array( * 'unique_key' => array( * 'unique_key' => array('text', 'url') * ) * ) * ) * * Note that the portion in brackets is automatically added to the key * when using the set_focus() method and is called the "scope" * * @access public * * @param string Scope to add to * @param string Unique key for the scope * @param string Parent key to add to * @param string Text to display (usually localized) * @param string URL to go to when text is clicked */ function add_component($scope, $key, $parent, $text, $url) { if ($scope == 'tab') { $this->tabs["$key"] = array($text, $url); } else if ($scope == 'section') { $this->sections["$parent"]["$key"] = $text; } else if ($scope == 'link') { $this->links["$parent"]["$key"] = array($text, $url); } } // ################################################################### /** * Generates the header HTML that is called in ISSO.Printer->page_start() * to setup the navigation frame * * @access public * * @return string Generated HTML content */ function generate_header_html() { $output = '' . "\n\n"; $output2 = array(); foreach ($this->toplinks AS $href => $text) { $output2[] = '' . $text . ''; } $output .= implode(' • ', $output2); return $output; } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>