2 /*=====================================================================*\
3 || ###################################################################
4 || # Iris Studios Shared Object Framework [#]issoversion[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Printer - Navigation Generator
24 * printer_navigation.php
30 * Printer - Navigation Generator
32 * This framework works in conjunction with ISSO.Printer to generate a page header
33 * and sidebar to be used for navigation. You set the navigation array and then can
34 * specify a given key to highlight elements. Elements are broken into three types:
35 * tabs (top of the page), groups (blocks of link actions), and links
37 * @author Iris Studios, Inc.
38 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
43 class Printer_Navigation
46 * Framework registry object
53 * Global links that are used for admin home, logout, etc.
57 var $toplinks = array();
60 * Navigational structure
64 var $structure = array();
66 // ###################################################################
70 function __construct(&$registry)
72 $this->registry
=& $registry;
75 // ###################################################################
79 function Printer_Navigation(&$registry)
81 $this->__construct($registry);
84 // ###################################################################
86 * Adds a global link to the array; these cannot be removed once added
90 * @param string Link text
91 * @param string HREF of the URL
93 function add_top_link($text, $href)
95 $this->toplinks
["$href"] = $text;
98 // ###################################################################
100 * Generates the header HTML that is called in ISSO.Printer->page_start()
101 * to setup the navigation frame
105 * @return string Generated HTML content
107 function generate_header_html()
109 $output = '<!-- navigation start -->' . "\n\n";
112 foreach ($this->toplinks
AS $href => $text)
114 $output2[] = '<a href="' . $href . '" class="nav_toplink">' . $text . '</a>';
117 $output .= implode(' • ', $output2);
123 /*=====================================================================*\
124 || ###################################################################
127 || ###################################################################
128 \*=====================================================================*/