From 9c04c7c80d298dfcb9674aa2af754d673f4c051c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 1 Apr 2006 23:25:24 +0000 Subject: [PATCH] Add code generation for sections and links --- printer_navigation.php | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/printer_navigation.php b/printer_navigation.php index 1c604a9..5e6c035 100644 --- a/printer_navigation.php +++ b/printer_navigation.php @@ -77,6 +77,13 @@ class Printer_Navigation */ var $links = array(); + /** + * Array of scopes to set focus to key + * @var array + * @access private + */ + var $focus = array('tab' => null, 'link' => null); + // ################################################################### /** * Constructor @@ -148,6 +155,36 @@ class Printer_Navigation } } + // ################################################################### + /** + * Sets the focus for either a tab or link + * + * @access public + * + * @param string Scope operator + * @param string Unique key in scope + */ + function set_focus($scope, $key) + { + if ($scope == 'tab') + { + $array = 'tabs'; + } + else if ($scope == 'link') + { + $array = 'links'; + } + else + { + trigger_error('Printer_Navigation::set_focus() only allows setting of focus for tab and link scopes', E_USER_ERROR); + } + + if (isset($this->{$array}["$key"])) + { + $this->focus["$scope"] = $key; + } + } + // ################################################################### /** * Generates the header HTML that is called in ISSO.Printer->page_start() @@ -169,6 +206,41 @@ class Printer_Navigation $output .= implode(' • ', $output2); + $output .= '
Tabs:
'; + + $output .= '
'; + return $output; } } -- 2.43.5